Fix some leaks

This commit is contained in:
TingPing
2014-02-12 10:28:53 -05:00
parent ba399eb7f9
commit b17c0276de
6 changed files with 16 additions and 0 deletions

View File

@@ -1404,7 +1404,10 @@ util_exec (const char *cmd)
#ifndef WIN32
pid = fork ();
if (pid == -1)
{
free (argv);
return -1;
}
if (pid == 0)
{
/* Now close all open file descriptors except stdin, stdout and stderr */