[PATCH 3/3] Fix release clcc_source when voicecall driver is removed

Zhenhua Zhang zhenhua.zhang at intel.com
Thu Dec 3 19:22:15 PST 2009


Release the timer to avoid invoking the callback function after
voicecall driver is removed.
---
 drivers/atmodem/voicecall.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/atmodem/voicecall.c b/drivers/atmodem/voicecall.c
index 1f8e0d1..e210454 100644
--- a/drivers/atmodem/voicecall.c
+++ b/drivers/atmodem/voicecall.c
@@ -921,6 +921,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);
 
-- 
1.6.5.2



More information about the ofono mailing list