summaryrefslogtreecommitdiffstats
path: root/src/simfs.c
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2011-02-10 00:26:15 -0600
committerDenis Kenzior <denkenz@gmail.com>2011-02-10 00:27:01 -0600
commit50c3d98ff3a6ccab021f498bafb29c4c4ff53ac2 (patch)
treef076f6b74dbcb28b7e884bb40a6f995242cc4ff4 /src/simfs.c
parentfb7e6652d21620d61b4d6b25a93fa97b3baa72f5 (diff)
downloadofono-50c3d98ff3a6ccab021f498bafb29c4c4ff53ac2.tar.bz2
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.
Diffstat (limited to 'src/simfs.c')
-rw-r--r--src/simfs.c11
1 files changed, 9 insertions, 2 deletions
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);
}