[PATCH 1/2] Fix: Remove released call from call lists
Zhenhua Zhang
zhenhua.zhang at intel.com
Mon Nov 16 02:20:45 PST 2009
We should remove the released call from the list to avoid
potiential double free problem.
---
drivers/hfpmodem/voicecall.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/hfpmodem/voicecall.c b/drivers/hfpmodem/voicecall.c
index 689597d..d12cd4c 100644
--- a/drivers/hfpmodem/voicecall.c
+++ b/drivers/hfpmodem/voicecall.c
@@ -137,6 +137,8 @@ static void release_call(struct ofono_voicecall *vc,
struct ofono_call *call)
at_util_release_id(&vd->id_list, call->id);
vd->local_release &= ~(1 << call->id);
+ vd->calls = g_slist_remove(vd->calls, call);
+
g_free(call);
}
--
1.6.2.5
More information about the ofono
mailing list