aboutsummaryrefslogtreecommitdiff
path: root/src/mm-iface-modem-cdma.c
diff options
context:
space:
mode:
authorBen Chan <benchan@chromium.org>2013-01-03 02:55:11 -0800
committerAleksander Morgado <aleksander@lanedo.com>2013-01-03 22:28:34 +0100
commitbc399d9cf87c3fb775fc677963bb2522c385e2e2 (patch)
tree0712d35132fb9a953d9bcb531a05d969ff18d569 /src/mm-iface-modem-cdma.c
parentd40ef838986eb62b4c657a981791e8225ce3ce2c (diff)
iface-modem-3gpp,iface-modem-cdma: check for deallocated RegistrationCheckContext
This patch fixes a crash in periodic_registration_checks_ready() due to access of an already deallocated RegistrationCheckContext. Thread 0 *CRASHED* ( SIGSEGV @ 0x00000000 ) 0x7fc344d355cd [ModemManager] - mm-iface-modem-cdma.c:1112 periodic_registration_checks_ready 0x7fc3449ea266 [libgio-2.0.so.0.3200.4] - gsimpleasyncresult.c:767 g_simple_async_result_complete 0x7fc3449ea368 [libgio-2.0.so.0.3200.4] - gsimpleasyncresult.c:779 complete_in_idle_cb 0x7fc344851dc4 [libglib-2.0.so.0.3200.4] - gmain.c:2539 g_main_context_dispatch 0x7fc344852147 [libglib-2.0.so.0.3200.4] - gmain.c:3146 g_main_context_iterate 0x7fc3448525a1 [libglib-2.0.so.0.3200.4] - gmain.c:3340 g_main_loop_run 0x7fc344d0f154 [ModemManager] - main.c:158 main 0x7fc34426a474 [libc-2.15.so] - libc-start.c:234 __libc_start_main 0x7fc344d0eb68 [ModemManager] + 0x0001bb68
Diffstat (limited to 'src/mm-iface-modem-cdma.c')
-rw-r--r--src/mm-iface-modem-cdma.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mm-iface-modem-cdma.c b/src/mm-iface-modem-cdma.c
index 8478df52..d582fb3d 100644
--- a/src/mm-iface-modem-cdma.c
+++ b/src/mm-iface-modem-cdma.c
@@ -1109,7 +1109,8 @@ periodic_registration_checks_ready (MMIfaceModemCdma *self,
/* Remove the running tag */
ctx = g_object_get_qdata (G_OBJECT (self), registration_check_context_quark);
- ctx->running = FALSE;
+ if (ctx)
+ ctx->running = FALSE;
}
static gboolean