From: Martin Ling Date: Sat, 5 Sep 2015 17:26:30 +0000 (+0100) Subject: sr_packet_free: Support SR_DF_ANALOG2. X-Git-Tag: libsigrok-0.4.0~264 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=83c1dbd9b547edc3f0aec80d7427b14672654d4a;p=libsigrok.git sr_packet_free: Support SR_DF_ANALOG2. --- diff --git a/src/session.c b/src/session.c index eb381f59..97b9512a 100644 --- a/src/session.c +++ b/src/session.c @@ -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); }