diff options
author | bloodstalker <thabogre@gmail.com> | 2017-04-02 12:43:50 +0000 |
---|---|---|
committer | bloodstalker <thabogre@gmail.com> | 2017-04-02 12:43:50 +0000 |
commit | ba407e763f31d647179d7a11305263b28ea4360d (patch) | |
tree | 2dad64dde5af7bb71a89e4a8fe4440d7590fb9ee /daemon | |
parent | updated as per the changes (diff) | |
download | mutator-ba407e763f31d647179d7a11305263b28ea4360d.tar.gz mutator-ba407e763f31d647179d7a11305263b28ea4360d.zip |
fixing some issues
Diffstat (limited to 'daemon')
-rw-r--r-- | daemon/daemon_aux.c | 7 |
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; } |