From: Denis Kenzior Date: Mon, 17 Aug 2009 20:08:14 +0000 (-0500) Subject: Cleanup SSC entries if USSD exits first X-Git-Tag: 0.4~200 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6d5090eafa3ea6f8c18dc67f2ad7c3428b50af88;p=platform%2Fupstream%2Fofono.git Cleanup SSC entries if USSD exits first --- diff --git a/src/ussd.c b/src/ussd.c index a9d837e..d4f2f54 100644 --- a/src/ussd.c +++ b/src/ussd.c @@ -492,6 +492,14 @@ static void ussd_unregister(struct ofono_atom *atom) struct ofono_modem *modem = __ofono_atom_get_modem(atom); const char *path = __ofono_atom_get_path(atom); + g_slist_foreach(ussd->ss_control_list, (GFunc)ssc_entry_destroy, NULL); + g_slist_free(ussd->ss_control_list); + ussd->ss_control_list = NULL; + + g_slist_foreach(ussd->ss_passwd_list, (GFunc)ssc_entry_destroy, NULL); + g_slist_free(ussd->ss_passwd_list); + ussd->ss_passwd_list = NULL; + ofono_modem_remove_interface(modem, SUPPLEMENTARY_SERVICES_INTERFACE); g_dbus_unregister_interface(conn, path, SUPPLEMENTARY_SERVICES_INTERFACE);