aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbloodstalker <thabogre@gmail.com>2017-04-02 12:43:50 +0000
committerbloodstalker <thabogre@gmail.com>2017-04-02 12:43:50 +0000
commitba407e763f31d647179d7a11305263b28ea4360d (patch)
tree2dad64dde5af7bb71a89e4a8fe4440d7590fb9ee
parentupdated as per the changes (diff)
downloadmutator-ba407e763f31d647179d7a11305263b28ea4360d.tar.gz
mutator-ba407e763f31d647179d7a11305263b28ea4360d.zip
fixing some issues
Diffstat (limited to '')
-rw-r--r--daemon/daemon_aux.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/daemon/daemon_aux.c b/daemon/daemon_aux.c
index 65fbc4b..00841de 100644
--- a/daemon/daemon_aux.c
+++ b/daemon/daemon_aux.c
@@ -110,6 +110,7 @@ int mutator_server(FILE* log_file)
/*Bind*/
if (bind(socket_desc, (struct sockaddr*)&server, sizeof(server)) < 0)
{
+ close(socket_desc);
perror("bind failed.error.\n");
return 1;
}
@@ -150,7 +151,11 @@ int mutator_server(FILE* log_file)
fprintf(log_file, "%s", NFOUND_CONFIG);
fprintf(log_file, "%s%d%s", "fopen returned: ", errno, "\n");
fprintf(log_file, "%s", SERVER_TERM);
- CLEAN_UP();
+
+ fclose(log_file);
+ close(client_sock);
+ close(socket_desc);
+
return errno;
}