diff options
author | Denis Kenzior <denkenz@gmail.com> | 2009-08-18 09:21:27 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2009-08-19 18:35:06 -0500 |
commit | 56e97cb4066ed4e87dc00a65ff6e41f36bfefded (patch) | |
tree | 2df5340bb747020fb71734a6b2d65c6a07a5f2dd | |
parent | 1c61fa3db42d53fd66b25377d81c6227233b4bdc (diff) | |
download | ofono-56e97cb4066ed4e87dc00a65ff6e41f36bfefded.tar.bz2 |
Refactor ECC: Free the new_en_list
Avoid a potential memory leak in case the interface is removed during
the SIM read operation.
-rw-r--r-- | src/voicecall.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/voicecall.c b/src/voicecall.c index c88e672a..f6939d59 100644 --- a/src/voicecall.c +++ b/src/voicecall.c @@ -514,6 +514,12 @@ static void voicecalls_destroy(gpointer userdata) calls->en_list = NULL; } + if (calls->new_en_list) { + g_slist_foreach(calls->new_en_list, (GFunc)g_free, NULL); + g_slist_free(calls->new_en_list); + calls->new_en_list = NULL; + } + for (l = calls->call_list; l; l = l->next) voicecall_dbus_unregister(modem, l->data); |