From 50c3d98ff3a6ccab021f498bafb29c4c4ff53ac2 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Thu, 10 Feb 2011 00:26:15 -0600 Subject: simfs: Fix leaking of the voicecall context When we're shutting down all atoms are removed and the voicecall context does not have a chance to be freed. Make sure simfs frees it. --- src/simfs.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/simfs.c b/src/simfs.c index af0508ca..3a97a10c 100644 --- a/src/simfs.c +++ b/src/simfs.c @@ -107,8 +107,15 @@ void sim_fs_free(struct sim_fs *fs) g_queue_free(fs->op_q); } - if (fs->contexts != NULL) - ofono_error("Freeing simfs, but contexs is not NULL"); + if (fs->contexts != NULL) { + GSList *l; + + for (l = fs->contexts; l; l = l->next) { + struct ofono_sim_context *context = l->data; + + sim_fs_context_free(context); + } + } g_free(fs); } -- cgit v1.2.3