Fixed wrong order of cleanup calls

This commit is contained in:
solusipse
2017-09-02 19:12:10 +02:00
parent 8ff08a0409
commit bd1751693b

View File

@@ -615,10 +615,11 @@ static void *handle_connection(void *args) {
print_error("Couldn't save a file!"); print_error("Couldn't save a file!");
print_separator(); print_separator();
close(c->socket);
// Cleanup // Cleanup
free(c); free(c);
free(slug); free(slug);
close(c->socket);
pthread_exit(NULL); pthread_exit(NULL);
return NULL; return NULL;
} }