]> granicus.if.org Git - php/commitdiff
- Fixed leak on error in popen/exec (and related functions)
authorPierre Joye <pajoye@php.net>
Sun, 30 Aug 2009 17:13:45 +0000 (17:13 +0000)
committerPierre Joye <pajoye@php.net>
Sun, 30 Aug 2009 17:13:45 +0000 (17:13 +0000)
NEWS
TSRM/tsrm_win32.c

diff --git a/NEWS b/NEWS
index 93db3f8793baab0bca3dfa32fa829eca43ec5011..cc6f70a974c27accdc2306ed65cc67fff09d2ee9 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -16,6 +16,8 @@ PHP                                                                        NEWS
 - Improved shared extension loading on OSX to use the standard Unix dlopen()
   API. (Scott)
 
+- Fixed leak on error in popen/exec (and related functions) on Windows.
+  (Pierre)
 - Fixed possible bad caching of symlinked directories in the realpath cache
   on Windows. (Pierre)
 - Fixed atime and mtime in stat related functions on Windows. (Pierre)
index b2e94d22af50569416c7d0fc3c3335dc2b7dcfeb..19139dd7aeb875caaebc9517268e2b6e8c685179 100644 (file)
@@ -371,6 +371,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);