]> 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 08abf6c184a00f516cd5d5a07b8c8f4d55145a12..e3e9c825758e5f548baa1b7f77a71f9bbb14bb64 100644 (file)
--- a/show.c
+++ b/show.c
@@ -224,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) {
@@ -543,7 +544,6 @@ void show_dev_detail(void)
        g_variant_unref(gvar_opts);
 
        sr_dev_close(sdi);
-       g_slist_free(devices);
 
 }