From be0ac2b1032b31fe583f922a1da9d74724255d30 Mon Sep 17 00:00:00 2001 From: Julien BLACHE Date: Fri, 8 May 2009 17:59:36 +0200 Subject: [PATCH] Add missing cleanup calls --- src/main.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main.c b/src/main.c index 343cff32..b327d744 100644 --- a/src/main.c +++ b/src/main.c @@ -464,6 +464,7 @@ int main(int argc, char *argv[]) { { DPRINTF(E_LOG, L_MAIN, "Error setting signal set\n"); + conffile_unload(); logger_deinit(); exit(EXIT_FAILURE); } @@ -476,6 +477,7 @@ int main(int argc, char *argv[]) { { DPRINTF(E_LOG, L_MAIN, "Could not initialize server\n"); + conffile_unload(); logger_deinit(); exit(EXIT_FAILURE); } @@ -489,6 +491,7 @@ int main(int argc, char *argv[]) { { DPRINTF(E_FATAL, L_MAIN, "mDNS init failed\n"); + conffile_unload(); logger_deinit(); exit(EXIT_FAILURE); } @@ -500,6 +503,7 @@ int main(int argc, char *argv[]) { DPRINTF(E_LOG,L_MAIN,"Error opening db: %s\n",perr); mdns_deinit(); + conffile_unload(); logger_deinit(); exit(EXIT_FAILURE); } @@ -518,6 +522,7 @@ int main(int argc, char *argv[]) { mdns_deinit(); db_deinit(); + conffile_unload(); logger_deinit(); exit(EXIT_FAILURE); } @@ -528,8 +533,10 @@ int main(int argc, char *argv[]) { { DPRINTF(E_FATAL, L_MAIN, "HTTPd thread failed to start\n"); + filescanner_deinit(); mdns_deinit(); db_deinit(); + conffile_unload(); logger_deinit(); exit(EXIT_FAILURE); } @@ -550,6 +557,7 @@ int main(int argc, char *argv[]) { filescanner_deinit(); mdns_deinit(); db_deinit(); + conffile_unload(); logger_deinit(); exit(EXIT_FAILURE); } @@ -601,6 +609,7 @@ int main(int argc, char *argv[]) { filescanner_deinit(); mdns_deinit(); db_deinit(); + conffile_unload(); logger_deinit(); exit(EXIT_FAILURE); }