mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Fix leak in previous commit
Turns out zend_update_property_str already does the copy implicitly.
This commit is contained in:
parent
13567d5dee
commit
2af19fb50a
1 changed files with 2 additions and 3 deletions
|
@ -207,11 +207,10 @@ static zend_object *zend_default_exception_new_ex(zend_class_entry *class_type,
|
|||
base_ce = i_get_exception_base(&obj);
|
||||
|
||||
if (EXPECTED(class_type != zend_ce_parse_error || !(filename = zend_get_compiled_filename()))) {
|
||||
zend_update_property_str(base_ce, &obj, "file", sizeof("file")-1,
|
||||
zend_string_copy(zend_get_executed_filename_ex()));
|
||||
zend_update_property_str(base_ce, &obj, "file", sizeof("file")-1, zend_get_executed_filename_ex());
|
||||
zend_update_property_long(base_ce, &obj, "line", sizeof("line")-1, zend_get_executed_lineno());
|
||||
} else {
|
||||
zend_update_property_str(base_ce, &obj, "file", sizeof("file")-1, zend_string_copy(filename));
|
||||
zend_update_property_str(base_ce, &obj, "file", sizeof("file")-1, filename);
|
||||
zend_update_property_long(base_ce, &obj, "line", sizeof("line")-1, zend_get_compiled_lineno());
|
||||
}
|
||||
zend_update_property(base_ce, &obj, "trace", sizeof("trace")-1, &trace);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue