summaryrefslogtreecommitdiff
path: root/src/session.c
diff options
context:
space:
mode:
authorDaniel Wagner <daniel.wagner@bmw-carit.de>2011-09-19 13:50:09 +0200
committerDaniel Wagner <daniel.wagner@bmw-carit.de>2011-09-22 15:45:49 +0200
commit05f581a62a332627b14337e30a9906861b6d3b44 (patch)
tree25d96cd5e254ffee92103fc1e59fd622cefc0112 /src/session.c
parent01ae86990380f8c37d7609c41337bc95b0b7869d (diff)
downloadconnman-05f581a62a332627b14337e30a9906861b6d3b44.tar.gz
connman-05f581a62a332627b14337e30a9906861b6d3b44.tar.bz2
connman-05f581a62a332627b14337e30a9906861b6d3b44.zip
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
Diffstat (limited to 'src/session.c')
-rw-r--r--src/session.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/session.c b/src/session.c
index 45770ed3..dd1bc762 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;
}