]> sigrok.org Git - libsigrok.git/blobdiff - src/session_driver.c
De-init vdev->capturefile when done
[libsigrok.git] / src / session_driver.c
index 0fecd6b813cc678a6192dc2ac1b91ca2d335989e..3a4aaa7a00b1919b272b977c08effb202cbbe598 100644 (file)
@@ -31,7 +31,7 @@
 
 /* size of payloads sent across the session bus */
 /** @cond PRIVATE */
-#define CHUNKSIZE (512 * 1024)
+#define CHUNKSIZE (4 * 1024 * 1024)
 /** @endcond */
 
 SR_PRIV struct sr_dev_driver session_driver_info;
@@ -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;
                        }
                }