summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Wagner <daniel.wagner@bmw-carit.de>2013-04-09 18:13:08 +0200
committerPatrik Flykt <patrik.flykt@linux.intel.com>2013-04-18 08:43:46 +0300
commitd1f1a426f8e9b5387247cde7acfdfc6719ee5af3 (patch)
tree88e5afa3a33e0a632bf6431e4b008f2fc4712de9 /src
parentd0afc98e7bbe46d48d0f0212d8062a52e004f986 (diff)
downloadconnman-d1f1a426f8e9b5387247cde7acfdfc6719ee5af3.tar.gz
connman-d1f1a426f8e9b5387247cde7acfdfc6719ee5af3.tar.bz2
connman-d1f1a426f8e9b5387247cde7acfdfc6719ee5af3.zip
session: Do not try to access already removed hash
Make sure we never try to cleanup when the hash table has been destroyed. In this case all resources have been freed already.
Diffstat (limited to 'src')
-rw-r--r--src/session.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/session.c b/src/session.c
index 69164580..5f5255e3 100644
--- a/src/session.c
+++ b/src/session.c
@@ -359,6 +359,9 @@ static void remove_policy(struct connman_session_policy *policy)
gpointer key, value;
struct connman_session *session;
+ if (session_hash == NULL)
+ return;
+
DBG("policy %p name %s", policy, policy->name);
g_hash_table_iter_init(&iter, session_hash);