gathdlc: Unregister read / write handlers

When GAtHDLC is being unregistered make sure to unregister read / write
handlers so as not to crash.
This commit is contained in:
Denis Kenzior 2011-02-28 12:14:48 -06:00
parent 1cbe91090d
commit 09ca5aaef0
1 changed files with 3 additions and 0 deletions

View File

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