mirror of git://git.sysmocom.de/ofono
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.
This commit is contained in:
parent
fb7e6652d2
commit
50c3d98ff3
11
src/simfs.c
11
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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue