From: Stefan BrĂ¼ns Date: Thu, 26 Nov 2015 21:55:55 +0000 (+0100) Subject: input: fix leak of config data in several input modules X-Git-Tag: libsigrok-0.4.0~91 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=c01378c95f34e60d3b67f84dc3a6c3c6c154186d;p=libsigrok.git input: fix leak of config data in several input modules --- diff --git a/src/input/binary.c b/src/input/binary.c index 8c5a19fd..f58af58d 100644 --- a/src/input/binary.c +++ b/src/input/binary.c @@ -83,6 +83,7 @@ static int process_buffer(struct sr_input *in) src = sr_config_new(SR_CONF_SAMPLERATE, g_variant_new_uint64(inc->samplerate)); meta.config = g_slist_append(NULL, src); sr_session_send(in->sdi, &packet); + g_slist_free(meta.config); sr_config_free(src); } diff --git a/src/input/chronovu_la8.c b/src/input/chronovu_la8.c index 1491e042..f42886ed 100644 --- a/src/input/chronovu_la8.c +++ b/src/input/chronovu_la8.c @@ -95,6 +95,7 @@ static int process_buffer(struct sr_input *in) src = sr_config_new(SR_CONF_SAMPLERATE, g_variant_new_uint64(inc->samplerate)); meta.config = g_slist_append(NULL, src); sr_session_send(in->sdi, &packet); + g_slist_free(meta.config); sr_config_free(src); } diff --git a/src/input/csv.c b/src/input/csv.c index 7b884674..ed2b4940 100644 --- a/src/input/csv.c +++ b/src/input/csv.c @@ -621,6 +621,7 @@ static int process_buffer(struct sr_input *in) src = sr_config_new(SR_CONF_SAMPLERATE, g_variant_new_uint64(samplerate)); meta.config = g_slist_append(NULL, src); sr_session_send(in->sdi, &packet); + g_slist_free(meta.config); sr_config_free(src); } diff --git a/src/input/vcd.c b/src/input/vcd.c index 0cf495e1..54e9c733 100644 --- a/src/input/vcd.c +++ b/src/input/vcd.c @@ -511,6 +511,7 @@ static int process_buffer(struct sr_input *in) src = sr_config_new(SR_CONF_SAMPLERATE, g_variant_new_uint64(samplerate)); meta.config = g_slist_append(NULL, src); sr_session_send(in->sdi, &packet); + g_slist_free(meta.config); sr_config_free(src); inc->started = TRUE; diff --git a/src/input/wav.c b/src/input/wav.c index 428dc73c..1b985edc 100644 --- a/src/input/wav.c +++ b/src/input/wav.c @@ -258,6 +258,7 @@ static int process_buffer(struct sr_input *in) src = sr_config_new(SR_CONF_SAMPLERATE, g_variant_new_uint64(inc->samplerate)); meta.config = g_slist_append(NULL, src); sr_session_send(in->sdi, &packet); + g_slist_free(meta.config); sr_config_free(src); inc->started = TRUE;