emulator: Make sure to cleanup on forceful exit

This commit is contained in:
Denis Kenzior 2011-05-24 13:45:36 -05:00
parent 4f7a2c06fd
commit 375a32e1f3
1 changed files with 8 additions and 0 deletions

View File

@ -738,6 +738,14 @@ static void emulator_unregister(struct ofono_atom *atom)
g_slist_free(em->indicators);
em->indicators = NULL;
g_at_ppp_unref(em->ppp);
em->ppp = NULL;
if (em->pns_id > 0) {
__ofono_private_network_release(em->pns_id);
em->pns_id = 0;
}
g_at_server_unref(em->server);
em->server = NULL;
}