diff options
-rw-r--r-- | src/simfs.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/simfs.c b/src/simfs.c index 8960bac6..4cfcd30f 100644 --- a/src/simfs.c +++ b/src/simfs.c @@ -108,15 +108,8 @@ void sim_fs_free(struct sim_fs *fs) fs->op_q = 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); - } - } + while (fs->contexts) + sim_fs_context_free(fs->contexts->data); g_free(fs); } |