Control socket fix

This commit is contained in:
Martin Pulec
2015-07-16 13:09:18 +02:00
parent a6c3b8db9a
commit 877868becc

View File

@@ -595,12 +595,13 @@ static void * control_thread(void *args)
if(ret <= 0) {
struct client *next;
CLOSESOCKET(cur->fd);
if(cur->prev) {
if (cur->prev) {
cur->prev->next = cur->next;
cur->next->prev = cur->prev;
} else {
clients = cur->next;
clients->prev = NULL;
}
if (cur->next) {
cur->next->prev = cur->prev;
}
next = cur->next;
free(cur);