gatppp: Unset disconnect function when unref PPP

Unset IO disconnect function when we try to destroy GAtPPP instance.
After freeing the instance, the IO disconnect function should not be
invoked.
This commit is contained in:
Zhenhua Zhang 2010-07-07 09:46:32 +08:00 committed by Denis Kenzior
parent e70b1f0abd
commit b3c35db955
1 changed files with 3 additions and 0 deletions

View File

@ -454,6 +454,9 @@ void g_at_ppp_unref(GAtPPP *ppp)
if (is_zero == FALSE)
return;
g_at_io_set_disconnect_function(g_at_hdlc_get_io(ppp->hdlc),
NULL, NULL);
if (ppp->net)
ppp_net_free(ppp->net);