]> sigrok.org Git - libsigrok.git/commitdiff
De-init vdev->capturefile when done
authorSoeren Apel <redacted>
Thu, 4 May 2017 16:40:39 +0000 (18:40 +0200)
committerSoeren Apel <redacted>
Thu, 4 May 2017 16:40:39 +0000 (18:40 +0200)
Without doing this, re-reading the input file
results in a segfault as the internal state
machine becomes confused.

src/session_driver.c

index 79a3b37b3e5fb0a1519e28851e779d1e16200c4d..3a4aaa7a00b1919b272b977c08effb202cbbe598 100644 (file)
@@ -123,6 +123,8 @@ static gboolean stream_session_data(struct sr_dev_inst *sdi)
                                return TRUE;
                        } else {
                                /* We got all the chunks, finish up. */
+                               g_free(vdev->capturefile);
+                               vdev->capturefile = NULL;
                                return FALSE;
                        }
                }