]> sigrok.org Git - libsigrok.git/commitdiff
sr_packet_free: Support SR_DF_ANALOG2.
authorMartin Ling <redacted>
Sat, 5 Sep 2015 17:26:30 +0000 (18:26 +0100)
committerUwe Hermann <redacted>
Sun, 20 Sep 2015 22:32:26 +0000 (00:32 +0200)
src/session.c

index eb381f5978e1e2a452e2e0c434b327299e1eaa6c..97b9512ad300d864c33e3cfe3bd9ccb3611e3606 100644 (file)
@@ -1323,6 +1323,7 @@ void sr_packet_free(struct sr_datafeed_packet *packet)
        const struct sr_datafeed_meta *meta;
        const struct sr_datafeed_logic *logic;
        const struct sr_datafeed_analog *analog;
+       const struct sr_datafeed_analog2 *analog2;
        struct sr_config *src;
        GSList *l;
 
@@ -1356,6 +1357,15 @@ void sr_packet_free(struct sr_datafeed_packet *packet)
                g_free(analog->data);
                g_free((void *)packet->payload);
                break;
+       case SR_DF_ANALOG2:
+               analog2 = packet->payload;
+               g_free(analog2->data);
+               g_free(analog2->encoding);
+               g_slist_free(analog2->meaning->channels);
+               g_free(analog2->meaning);
+               g_free(analog2->spec);
+               g_free((void *)packet->payload);
+               break;
        default:
                sr_err("Unknown packet type %d", packet->type);
        }