gatppp: Make sure to clean up guard_timeout_source
authorDenis Kenzior <denkenz@gmail.com>
Sun, 22 May 2011 13:34:21 +0000 (08:34 -0500)
committerDenis Kenzior <denkenz@gmail.com>
Tue, 24 May 2011 17:25:07 +0000 (12:25 -0500)
gatchat/gatppp.c

index 7494253..200bd5c 100644 (file)
@@ -602,6 +602,11 @@ void g_at_ppp_unref(GAtPPP *ppp)
                ppp->ppp_dead_source = 0;
        }
 
+       if (ppp->guard_timeout_source) {
+               g_source_remove(ppp->guard_timeout_source);
+               ppp->guard_timeout_source = 0;
+       }
+
        g_at_hdlc_unref(ppp->hdlc);
 
        g_free(ppp);