From: Soeren Apel Date: Thu, 4 May 2017 16:40:39 +0000 (+0200) Subject: De-init vdev->capturefile when done X-Git-Tag: libsigrok-0.5.0~75 X-Git-Url: https://sigrok.org/gitweb/?p=libsigrok.git;a=commitdiff_plain;h=b7939d7cac2fa51c5d9ba84c7ea7aee85f8395d6 De-init vdev->capturefile when done Without doing this, re-reading the input file results in a segfault as the internal state machine becomes confused. --- diff --git a/src/session_driver.c b/src/session_driver.c index 79a3b37b..3a4aaa7a 100644 --- a/src/session_driver.c +++ b/src/session_driver.c @@ -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; } }