Fixed wrong order of cleanup calls - fiche - A pastebin adjusted for gopher use
(HTM) git clone git://vernunftzentrum.de/fiche.git
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) LICENSE
---
(DIR) commit bd1751693b93975e1e0a8754572897743caf0a6b
(DIR) parent 8ff08a04093e51dfdbde0b6a4f8f3e58dcbe43be
(HTM) Author: solusipse <solus1ps3@gmail.com>
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(-)
---
(DIR) 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;
}