Skip to content

Commit

Permalink
Fixed bug #70431 (Memory leak in php_ini.c)
Browse files Browse the repository at this point in the history
  • Loading branch information
laruence committed Sep 10, 2015
1 parent 66643f6 commit a8368dd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
3 changes: 2 additions & 1 deletion main/php_ini.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
Expand Down Expand Up @@ -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));
}
Expand Down

0 comments on commit a8368dd

Please sign in to comment.