summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Joye <pajoye@php.net>2009-08-30 17:13:45 +0000
committerPierre Joye <pajoye@php.net>2009-08-30 17:13:45 +0000
commit61de1cbf1f1f6da497cec3796e4adceff47e5a92 (patch)
treeb7f3275716545896526b5fd70efb66aaa0b602f3
parent0ff589c12ddfe01bd53630ad1f2754d47fdb5dcc (diff)
downloadphp-git-61de1cbf1f1f6da497cec3796e4adceff47e5a92.tar.gz
- Fixed leak on error in popen/exec (and related functions)
-rw-r--r--TSRM/tsrm_win32.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/TSRM/tsrm_win32.c b/TSRM/tsrm_win32.c
index b43ccdf26b..2e38f1b357 100644
--- a/TSRM/tsrm_win32.c
+++ b/TSRM/tsrm_win32.c
@@ -373,6 +373,7 @@ TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd,
sprintf(cmd, "%s /c \"%s\"", TWG(comspec), command);
if (!CreateProcess(NULL, cmd, &security, &security, security.bInheritHandle, dwCreateFlags, env, cwd, &startup, &process)) {
+ free(cmd);
return NULL;
}
free(cmd);