Hi Daniel,

On 04.04.2013 19:23, Daniel Wagner wrote:
From: Daniel Wagner <[email protected]>

Make sure we never try to cleanup when the hash table has
been destroyed. In this case all resources have been
freed already.
---
  src/session.c | 3 +++
  1 file changed, 3 insertions(+)

diff --git a/src/session.c b/src/session.c
index 6916458..5f5255e 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);


Perhaps the commit subject should say "Do not try to access already removed hash" or similar. Now the commit msg gives wrong impression although the patch itself is just fine.

Cheers,
Jukka

_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman

Reply via email to