summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhenhua Zhang <zhenhua.zhang@intel.com>2009-12-04 11:22:15 +0800
committerDenis Kenzior <denkenz@gmail.com>2009-12-04 16:52:32 -0600
commit62df556f289bd250ebf648045ce8dfe17f4aa83b (patch)
tree16a3481a7b43acb5c56689619029068983441647
parentd90c657bd47790c407f61439896e29797f3731ba (diff)
downloadofono-62df556f289bd250ebf648045ce8dfe17f4aa83b.tar.bz2
Fix release clcc_source when voicecall is removed
Release the timer to avoid invoking the callback function after voicecall driver is removed.
-rw-r--r--drivers/atmodem/voicecall.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/atmodem/voicecall.c b/drivers/atmodem/voicecall.c
index 3d8fb590..885cbfa3 100644
--- a/drivers/atmodem/voicecall.c
+++ b/drivers/atmodem/voicecall.c
@@ -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);