com php-src: fix leak: win32/ioutil.c

From: Date: Thu, 01 Sep 2016 21:45:31 +0000
Subject: com php-src: fix leak: win32/ioutil.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-94241@lists.php.net to get a copy of this message
Commit: 7020e6f9ae6d12e841e09aa582d843ffa5478e08 Author: Anatol Belski <ab@php.net> Thu, 1 Sep 2016 20:48:33 +0200 Parents: 0a50cbabf67a21f0c0ea02f120ae4453b6f1eb10 Branches: PHP-7.1 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=7020e6f9ae6d12e841e09aa582d843ffa5478e08 Log: fix leak Changed paths: M win32/ioutil.c Diff: diff --git a/win32/ioutil.c b/win32/ioutil.c index b01edd2..8f85140 100644 --- a/win32/ioutil.c +++ b/win32/ioutil.c @@ -467,6 +467,7 @@ PW32IO size_t php_win32_ioutil_dirname(char *path, size_t len) endw--; } if (endw < pathw) { + free(startw); /* The path only contained slashes */ path[0] = PHP_WIN32_IOUTIL_DEFAULT_SLASH; path[1] = '\0'; @@ -478,6 +479,7 @@ PW32IO size_t php_win32_ioutil_dirname(char *path, size_t len) endw--; } if (endw < pathw) { + free(startw); path[0] = '.'; path[1] = '\0'; return 1 + len_adjust; @@ -488,6 +490,7 @@ PW32IO size_t php_win32_ioutil_dirname(char *path, size_t len) endw--; } if (endw < pathw) { + free(startw); path[0] = PHP_WIN32_IOUTIL_DEFAULT_SLASH; path[1] = '\0'; return 1 + len_adjust;

« previous php.cvs (#94241) next »