demo: Unref the IO channel when it is no longer used

This commit is contained in:
Joel Holdsworth 2013-04-14 19:19:35 +01:00 committed by Bert Vermeulen
parent ed20a42803
commit 2150a69b76
1 changed files with 2 additions and 0 deletions

View 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;