Fixed wrong order of cleanup calls - fiche - A pastebin adjusted for gopher use | |
git clone git://vernunftzentrum.de/fiche.git | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit bd1751693b93975e1e0a8754572897743caf0a6b | |
parent 8ff08a04093e51dfdbde0b6a4f8f3e58dcbe43be | |
Author: solusipse <[email protected]> | |
Date: Sat, 2 Sep 2017 19:12:10 +0200 | |
Fixed wrong order of cleanup calls | |
Diffstat: | |
fiche.c | 3 ++- | |
1 file changed, 2 insertions(+), 1 deletion(-) | |
--- | |
diff --git a/fiche.c b/fiche.c | |
@@ -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; | |
} |