diff options
-rw-r--r-- | src/voicecall.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/voicecall.c b/src/voicecall.c index 46768dcd..5f5f263e 100644 --- a/src/voicecall.c +++ b/src/voicecall.c @@ -506,6 +506,12 @@ static void voicecalls_destroy(gpointer userdata) calls->emit_en_source = 0; } + if (calls->en_list) { + g_slist_foreach(calls->en_list, (GFunc)g_free, NULL); + g_slist_free(calls->en_list); + calls->en_list = NULL; + } + for (l = calls->call_list; l; l = l->next) voicecall_dbus_unregister(modem, l->data); @@ -1822,13 +1828,6 @@ void ofono_voicecall_unregister(struct ofono_modem *modem) if (!modem->voicecalls) return; - l = modem->voicecalls->en_list; - if (l) { - g_slist_foreach(l, (GFunc)g_free, NULL); - g_slist_free(l); - l = NULL; - } - ofono_modem_remove_interface(modem, VOICECALL_MANAGER_INTERFACE); g_dbus_unregister_interface(conn, modem->path, VOICECALL_MANAGER_INTERFACE); |