MINOR: fix a few memory usage errors

These are either use after free errors or small leaks where memory
is not free'd after some error state is detected.
This commit is contained in:
Dirkjan Bussink
2014-04-28 22:57:16 +00:00
committed by Willy Tarreau
parent e21f84903e
commit 07fcaaa4cd
4 changed files with 9 additions and 7 deletions

View File

@@ -1610,6 +1610,8 @@ int main(int argc, char **argv)
exit(0); /* parent must leave */
}
free(children);
children = NULL;
/* if we're NOT in QUIET mode, we should now close the 3 first FDs to ensure
* that we can detach from the TTY. We MUST NOT do it in other cases since
* it would have already be done, and 0-2 would have been affected to listening