diff options
author | Pierre Joye <pajoye@php.net> | 2009-08-30 17:13:45 +0000 |
---|---|---|
committer | Pierre Joye <pajoye@php.net> | 2009-08-30 17:13:45 +0000 |
commit | a966ab428ac07726e6e6996e902364679ea81b77 (patch) | |
tree | a26a8a6542a4ade6232db54e7fc6cbf5052e713a | |
parent | 7aa125747efa86b9f030f0e3eab18b7594b9f292 (diff) | |
download | php-git-a966ab428ac07726e6e6996e902364679ea81b77.tar.gz |
- Fixed leak on error in popen/exec (and related functions)
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | TSRM/tsrm_win32.c | 1 |
2 files changed, 3 insertions, 0 deletions
@@ -3,6 +3,8 @@ PHP NEWS ?? ??? 2009, PHP 5.2.11 - Added missing sanity checks around exif processing (Ilia) +- Fixed leak on error in popen/exec (and related functions on Windows. (Pierre) + - Fixed bug #49289 (bcmath module doesn't compile with phpize configure). (Jani) - Fixed bug #49286 (php://input (php_stream_input_read) is broken). (Jani) diff --git a/TSRM/tsrm_win32.c b/TSRM/tsrm_win32.c index f523ead703..01f1af2f31 100644 --- a/TSRM/tsrm_win32.c +++ b/TSRM/tsrm_win32.c @@ -239,6 +239,7 @@ TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd, cmd = (char*)malloc(strlen(command)+strlen(TWG(comspec))+sizeof(" /c ")); sprintf(cmd, "%s /c %s", TWG(comspec), command); if (!CreateProcess(NULL, cmd, &security, &security, security.bInheritHandle, NORMAL_PRIORITY_CLASS|CREATE_NO_WINDOW, env, cwd, &startup, &process)) { + free(cmd); return NULL; } free(cmd); |