Control socked: fixed deletion from linked-list

This commit is contained in:
Martin Pulec
2015-06-26 13:19:05 +02:00
parent 10ff4f22e1
commit a70ad76463

View File

@@ -649,8 +649,10 @@ static void * control_thread(void *args)
CLOSESOCKET(cur->fd);
if(cur->prev) {
cur->prev->next = cur->next;
cur->next->prev = cur->prev;
} else {
clients = cur->next;
clients->prev = NULL;
}
next = cur->next;
free(cur);