Skip to content

Commit

Permalink
Fixed wrong order of cleanup calls
Browse files Browse the repository at this point in the history
  • Loading branch information
solusipse committed Sep 2, 2017
1 parent 8ff08a0 commit bd17516
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fiche.c
Original file line number Diff line number Diff line change
Expand Up @@ -615,10 +615,11 @@ static void *handle_connection(void *args) {
print_error("Couldn't save a file!");
print_separator();

close(c->socket);

// Cleanup
free(c);
free(slug);
close(c->socket);
pthread_exit(NULL);
return NULL;
}
Expand Down

0 comments on commit bd17516

Please sign in to comment.