From: Daniel Wagner Date: Mon, 19 Sep 2011 11:50:09 +0000 (+0200) Subject: session: Fix null pointer derefencing X-Git-Tag: 2.0_alpha~1089 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=05f581a62a332627b14337e30a9906861b6d3b44;p=framework%2Fconnectivity%2Fconnman.git session: Fix null pointer derefencing When an emergency session sets back the EmergencyCall property, all other session are notified. If a session previously was not connected (online == FALSE) no entry (services) was selected. We should not derefency a NULL pointer in this case. Fixes BMC#22880 --- diff --git a/src/session.c b/src/session.c index 45770ed..dd1bc76 100644 --- a/src/session.c +++ b/src/session.c @@ -987,8 +987,10 @@ static void session_changed(struct connman_session *session, } break; case CONNMAN_SESSION_TRIGGER_ECALL: - if (info->online == FALSE && info->entry->service != NULL) + if (info->online == FALSE && info->entry != NULL && + info->entry->service != NULL) { test_and_disconnect(session); + } break; }