]> sigrok.org Git - libsigrok.git/commitdiff
input: fix leak of config data in several input modules
authorStefan Brüns <redacted>
Thu, 26 Nov 2015 21:55:55 +0000 (22:55 +0100)
committerUwe Hermann <redacted>
Sun, 29 Nov 2015 00:13:58 +0000 (01:13 +0100)
src/input/binary.c
src/input/chronovu_la8.c
src/input/csv.c
src/input/vcd.c
src/input/wav.c

index 8c5a19fd4cc116cc6ce913b7297d7e9b7ee3e997..f58af58d16ac1d35e649a1db7761a0cf3fe495ec 100644 (file)
@@ -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);
                }
 
index 1491e0425884706a0961f12a6c5b4db372f61038..f42886ed87e21037b83efc443856952a9dfe3033 100644 (file)
@@ -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);
                }
 
index 7b884674730e044e925cabb7bc0263c15df2cb40..ed2b49409b43d9b25c611ce47090c435d90cb5a2 100644 (file)
@@ -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);
                }
 
index 0cf495e181116abb99e7a0581ceaa4ff4a6f414e..54e9c73359854d222670ad838efb700a6cc74520 100644 (file)
@@ -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;
index 428dc73cfafbc73f09091bb49849cd3ca70b0a53..1b985edca632c3828ed4bd5ba6c857ede43c8bc6 100644 (file)
@@ -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;