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
This commit is contained in:
Sebastian Dransfeld 2014-07-10 10:04:23 +02:00
parent 5981069012
commit cd63abe7e0
1 changed files with 6 additions and 1 deletions

View File

@ -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();