Bug #70431 [Opn]: Memory leak in php_ini.c
| From: | laruence@php.net | Date: | Sat, 05 Sep 2015 03:25:00 +0000 |
| Subject: | Bug #70431 [Opn]: Memory leak in php_ini.c | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-195779@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=70431&edit=1
ID: 70431
Updated by: laruence@php.net
Reported by: sixd@php.net
Summary: Memory leak in php_ini.c
Status: Open
Type: Bug
Package: Scripting Engine problem
Operating System: Linux
PHP Version: 7.0Git-2015-09-04 (Git)
Block user comment: N
Private report: N
New Comment:
any script to reproduce this?
Previous Comments:
------------------------------------------------------------------------
[2015-09-04 20:59:42] sixd@php.net
Description:
------------
==12787== 51 bytes in 1 blocks are definitely lost in loss record 363 of 675
==12787== at 0x4A069EE: malloc (vg_replace_malloc.c:270)
==12787== by 0x681D37: _estrndup (zend_alloc.c:2516)
==12787== by 0x64E44D: expand_filepath_with_mode (fopen_wrappers.c:822)
==12787== by 0x650B8E: php_init_config (php_ini.c:555)
==12787== by 0x64A5A4: php_module_startup (main.c:2147)
==12787== by 0x73B3CC: php_cli_startup (php_cli.c:423)
==12787== by 0x73CEE3: main (php_cli.c:1322)
Fix (from @Senthil) is:
--- php_ini.c.orig 2015-09-05 00:02:16.000000000 +1000
+++ php_ini.c 2015-09-04 23:58:13.000000000 +1000
@@ -600,6 +600,8 @@
if (opened_path) {
zend_string_release(opened_path);
}
+ efree((char*) fh.filename);
+ fh.filename = (char *) NULL;
php_ini_opened_path = zend_strndup(Z_STRVAL(tmp), Z_STRLEN(tmp));
}
}
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=70431&edit=1