diff --git a/src/chat/misc.c b/src/chat/misc.c index ed7b381..2eb40c0 100644 --- a/src/chat/misc.c +++ b/src/chat/misc.c @@ -155,9 +155,9 @@ void *why2_communicate_thread(void *arg) printf("User exited.\t%d\n", connection.connection); //DEALLOCATION - remove_node(get_node(connection.connection)); - close(*((int*) arg)); why2_deallocate(received); + remove_node(get_node(connection.connection)); + close(connection.connection); return NULL; }