sim-auth: Improve pending cleanup on sim_auth_remove

This commit is contained in:
Denis Kenzior 2018-02-28 11:28:54 -06:00
parent d65a2fc377
commit dca9071ffe
1 changed files with 9 additions and 1 deletions

View File

@ -141,7 +141,15 @@ static void sim_auth_unregister(struct ofono_atom *atom)
free_apps(sa);
g_free(sa->nai);
g_free(sa->pending);
if (sa->pending) {
__ofono_dbus_pending_reply(&sa->pending->msg,
__ofono_error_sim_not_ready(sa->pending->msg));
__ofono_sim_remove_session_watch(sa->pending->session,
sa->pending->watch_id);
g_free(sa->pending);
sa->pending = NULL;
}
}
static void sim_auth_remove(struct ofono_atom *atom)