com php-src: Fix memory leak: ext/standard/string.c
| From: | Anatol Belski | Date: | Sat, 30 Mar 2019 22:04:52 +0000 |
| Subject: | com php-src: Fix memory leak: ext/standard/string.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-105422@lists.php.net to get a copy of this message | ||
Commit: ba2269ab9e88e6acc4f3626527ed5ccd24f02872
Author: Anatol Belski <ab@php.net> Sat, 30 Mar 2019 23:04:52 +0100
Parents: 4d028a9ee9c95f413253cc71df3eaccef492aeb1
Branches: PHP-7.4 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=ba2269ab9e88e6acc4f3626527ed5ccd24f02872
Log:
Fix memory leak
Changed paths:
M ext/standard/string.c
Diff:
diff --git a/ext/standard/string.c b/ext/standard/string.c
index 91cb14d..194ce9f 100644
--- a/ext/standard/string.c
+++ b/ext/standard/string.c
@@ -4954,6 +4954,7 @@ PHP_FUNCTION(parse_str)
} else {
arrayArg = zend_try_array_init(arrayArg);
if (!arrayArg) {
+ efree(res);
return;
}