Skip to content

Commit

Permalink
sim-auth: Improve pending cleanup on sim_auth_remove
Browse files Browse the repository at this point in the history
  • Loading branch information
denkenz authored and monich committed Feb 5, 2020
1 parent 1c1e4fa commit b87f666
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion ofono/src/sim-auth.c
Expand Up @@ -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)
Expand Down

0 comments on commit b87f666

Please sign in to comment.