com php-src: Fixed bug #70431 (Memory leak in php_ini.c) : NEWS main/php_ini.c
| From: | Xinchen Hui | Date: | Thu, 10 Sep 2015 11:56:13 +0000 |
| Subject: | com php-src: Fixed bug #70431 (Memory leak in php_ini.c) : NEWS main/php_ini.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-88992@lists.php.net to get a copy of this message | ||
Commit: a8368ddc38a1940e705914699478dd1f83e745ee
Author: Xinchen Hui <laruence@gmail.com> Thu, 10 Sep 2015 19:53:37 +0800
Parents: 66643f6192749860a1b17d9dc9b69f98dcfe5256
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=a8368ddc38a1940e705914699478dd1f83e745ee
Log:
Fixed bug #70431 (Memory leak in php_ini.c)
Bugs:
https://bugs.php.net/70431
Changed paths:
M NEWS
M main/php_ini.c
Diff:
diff --git a/NEWS b/NEWS
index d55833c..f89bb1a 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,9 @@ PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
17 Sep 2015, PHP 7.0.0 RC 3
+- Core:
+ . Fixed bug #70431 (Memory leak in php_ini.c). (Sixed, Laruence)
+
- CLI server:
. Fixed bug #68291 (404 on urls with '+'). (cmb)
diff --git a/main/php_ini.c b/main/php_ini.c
index ac79e60..67434d6 100644
--- a/main/php_ini.c
+++ b/main/php_ini.c
@@ -553,7 +553,6 @@ int php_init_config(void)
fh.handle.fp = VCWD_FOPEN(php_ini_file_name, "r");
if (fh.handle.fp) {
fh.filename = expand_filepath(php_ini_file_name, NULL);
- opened_path = zend_string_init(fh.filename, strlen(fh.filename), 0);
}
}
}
@@ -599,6 +598,8 @@ int php_init_config(void)
zend_hash_str_update(&configuration_hash, "cfg_file_path",
sizeof("cfg_file_path")-1, &tmp);
if (opened_path) {
zend_string_release(opened_path);
+ } else {
+ efree((char *)fh.filename);
}
php_ini_opened_path = zend_strndup(Z_STRVAL(tmp), Z_STRLEN(tmp));
}