From cd63abe7e0988b8e96d1f00ea284cd6f9711bee9 Mon Sep 17 00:00:00 2001 From: Sebastian Dransfeld Date: Thu, 10 Jul 2014 10:04:23 +0200 Subject: [PATCH] free forked config on error If an error happens during main, the forked config isn't free'd. So if the config exists at end, free it. CID 1100644 --- src/bin/main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/bin/main.c b/src/bin/main.c index 90a7bf38..ccc70841 100644 --- a/src/bin/main.c +++ b/src/bin/main.c @@ -2813,7 +2813,7 @@ elm_main(int argc, char **argv) }; Win *wn; Term *term; - Config *config; + Config *config = NULL; Split *sp; int args, retval = EXIT_SUCCESS; int remote_try = 0; @@ -3178,6 +3178,11 @@ remote: #if (ECORE_VERSION_MAJOR > 1) || (ECORE_VERSION_MINOR >= 8) free(cmd); #endif + if (config) + { + config_del(config); + config = NULL; + } ipc_shutdown();