From: Joel Holdsworth Date: Sun, 14 Apr 2013 18:19:35 +0000 (+0100) Subject: demo: Unref the IO channel when it is no longer used X-Git-Tag: dsupstream~151 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=2150a69b7633ebd1bcf13f645c026506f3dfe03b;p=libsigrok.git demo: Unref the IO channel when it is no longer used --- diff --git a/hardware/demo/demo.c b/hardware/demo/demo.c index d2497d5a..1bd870d8 100644 --- a/hardware/demo/demo.c +++ b/hardware/demo/demo.c @@ -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;