]> sigrok.org Git - sigrok-cli.git/blobdiff - show.c
Free results of device scan as soon as possible.
[sigrok-cli.git] / show.c
diff --git a/show.c b/show.c
index 4cdf7049da05e51809ba1f4277560fac5b33b55d..e3e9c825758e5f548baa1b7f77a71f9bbb14bb64 100644 (file)
--- a/show.c
+++ b/show.c
@@ -21,9 +21,6 @@
 #include <glib.h>
 #include <string.h>
 
-extern gint opt_loglevel;
-extern gchar *opt_pds;
-
 static gint sort_inputs(gconstpointer a, gconstpointer b)
 {
        const struct sr_input_format *ia = a, *ib = b;
@@ -227,6 +224,7 @@ void show_dev_detail(void)
        }
 
        sdi = devices->data;
+       g_slist_free(devices);
        print_dev_line(sdi);
 
        if (sr_dev_open(sdi) != SR_OK) {
@@ -546,7 +544,6 @@ void show_dev_detail(void)
        g_variant_unref(gvar_opts);
 
        sr_dev_close(sdi);
-       g_slist_free(devices);
 
 }