Fix release clcc_source when voicecall is removed
authorZhenhua Zhang <zhenhua.zhang@intel.com>
Fri, 4 Dec 2009 03:22:15 +0000 (11:22 +0800)
committerDenis Kenzior <denkenz@gmail.com>
Fri, 4 Dec 2009 22:52:32 +0000 (16:52 -0600)
Release the timer to avoid invoking the callback function after
voicecall driver is removed.

drivers/atmodem/voicecall.c

index 3d8fb59..885cbfa 100644 (file)
@@ -872,6 +872,9 @@ static void at_voicecall_remove(struct ofono_voicecall *vc)
 {
        struct voicecall_data *vd = ofono_voicecall_get_data(vc);
 
+       if (vd->clcc_source)
+               g_source_remove(vd->clcc_source);
+
        g_slist_foreach(vd->calls, (GFunc) g_free, NULL);
        g_slist_free(vd->calls);