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
This commit is contained in:
Ben Chan
2013-01-03 02:55:11 -08:00
committed by Aleksander Morgado
parent d40ef83898
commit bc399d9cf8
2 changed files with 4 additions and 2 deletions

View File

@@ -1147,7 +1147,8 @@ periodic_registration_checks_ready (MMIfaceModem3gpp *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

View File

@@ -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