From 09ca5aaef08887567c2f95a80c2549a3b480678f Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Mon, 28 Feb 2011 12:14:48 -0600 Subject: [PATCH] gathdlc: Unregister read / write handlers When GAtHDLC is being unregistered make sure to unregister read / write handlers so as not to crash. --- gatchat/gathdlc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gatchat/gathdlc.c b/gatchat/gathdlc.c index 2d9eb6a6..00576022 100644 --- a/gatchat/gathdlc.c +++ b/gatchat/gathdlc.c @@ -277,6 +277,9 @@ void g_at_hdlc_unref(GAtHDLC *hdlc) hdlc->record_fd = -1; } + g_at_io_set_write_handler(hdlc->io, NULL, NULL); + g_at_io_set_read_handler(hdlc->io, NULL, NULL); + g_at_io_unref(hdlc->io); hdlc->io = NULL;