From 4385266bb7e94c48bfd05434b3b983bca01721b8 Mon Sep 17 00:00:00 2001 From: Jan Vidar Krey Date: Wed, 17 Oct 2012 20:54:46 +0200 Subject: [PATCH] Free all memory in case the hub does not start because of port already in use. --- src/core/main.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/core/main.c b/src/core/main.c index 4c9a172..bb78672 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -136,7 +136,13 @@ int main_loop() { hub = hub_start_service(&configuration); if (!hub) + { + acl_shutdown(&acl); + free_config(&configuration); + net_destroy(); + hub_log_shutdown(); return -1; + } #if !defined(WIN32) setup_signal_handlers(hub); #endif