diff options
author | Mingli Wu <mingli@southpole.se> | 2012-12-04 16:33:47 +0100 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2012-12-04 23:48:14 -0600 |
commit | 911eeb6565bf3cdf04322f3a2c040431b19808bb (patch) | |
tree | 6f231416d95dcbee971af2125f69594ecae19c8f /drivers/atmodem/sim-auth.c | |
parent | 25e7ecd3c783d03e833938c617e4507bf6e9394a (diff) | |
download | ofono-911eeb6565bf3cdf04322f3a2c040431b19808bb.tar.bz2 |
atmodem: remove pending idle callbacks at removal
If device probe and removal happen in short succession, it's possible
that the idle handler registered in the probe function doesn't run before
the device is removed. In this case, the idle handler needs to be
unregistered so that it does not run and try to access the data that's
destroyed during the removal.
Diffstat (limited to 'drivers/atmodem/sim-auth.c')
-rw-r--r-- | drivers/atmodem/sim-auth.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/atmodem/sim-auth.c b/drivers/atmodem/sim-auth.c index 9ce810f6..271ceed2 100644 --- a/drivers/atmodem/sim-auth.c +++ b/drivers/atmodem/sim-auth.c @@ -139,6 +139,7 @@ static void at_sim_auth_remove(struct ofono_sim_auth *sa) { struct sim_auth_data *sad = ofono_sim_auth_get_data(sa); + g_idle_remove_by_data(sa); ofono_sim_auth_set_data(sa, NULL); g_at_chat_unref(sad->chat); |