session: Fix error path __connman_session_creat()
authorDaniel Wagner <daniel.wagner@bmw-carit.de>
Fri, 13 May 2011 14:09:54 +0000 (16:09 +0200)
committerDaniel Wagner <daniel.wagner@bmw-carit.de>
Fri, 13 May 2011 14:26:11 +0000 (16:26 +0200)
Don't free the session if it exists already.

src/session.c

index b57ef71..d068087 100644 (file)
@@ -1323,6 +1323,7 @@ int __connman_session_create(DBusMessage *msg)
 
        session = g_hash_table_lookup(session_hash, session_path);
        if (session != NULL) {
+               session = NULL;
                err = -EEXIST;
                goto err;
        }