]> sigrok.org Git - libsigrok.git/commitdiff
demo: Unref the IO channel when it is no longer used
authorJoel Holdsworth <redacted>
Sun, 14 Apr 2013 18:19:35 +0000 (19:19 +0100)
committerBert Vermeulen <redacted>
Sun, 14 Apr 2013 21:39:15 +0000 (23:39 +0200)
hardware/demo/demo.c

index d2497d5a4871c69ea0733fb3b7d62ede3c8d5e0c..1bd870d849b09e3ddce0d659340ec8fdc9acacda 100644 (file)
@@ -509,6 +509,8 @@ static int hw_dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data)
 
        sr_session_source_remove_channel(devc->channel);
        g_io_channel_shutdown(devc->channel, FALSE, NULL);
+       g_io_channel_unref(devc->channel);
+       devc->channel = NULL;
 
        /* Send last packet. */
        packet.type = SR_DF_END;