Call client_destroy when releasing it from session
authorAdam Dickmeiss <adam@indexdata.dk>
Mon, 19 Apr 2010 11:52:03 +0000 (13:52 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Mon, 19 Apr 2010 11:52:03 +0000 (13:52 +0200)
src/session.c

index 676627c..33331fb 100644 (file)
@@ -452,7 +452,11 @@ static void select_targets_callback(void *context, struct session_database *db)
 static void session_remove_clients(struct session *se)
 {
     while (se->clients)
-        client_remove_from_session(se->clients);
+    {
+        struct client *cl = se->clients;
+        client_remove_from_session(cl);
+        client_destroy(cl);
+    }
 }
 
 // Associates a set of clients with a session;