From 05f581a62a332627b14337e30a9906861b6d3b44 Mon Sep 17 00:00:00 2001 From: Daniel Wagner Date: Mon, 19 Sep 2011 13:50:09 +0200 Subject: [PATCH] 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 --- src/session.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; } -- 2.7.4