com php-src: Fix leak in previous commit: Zend/zend_exception s.c

From: Date: Fri, 14 Aug 2015 15:04:33 +0000
Subject: com php-src: Fix leak in previous commit: Zend/zend_exception s.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-88536@lists.php.net to get a copy of this message
Commit: 2af19fb50a593faaba53a8b0980bae93e89fbbb2 Author: Nikita Popov <nikic@php.net> Fri, 14 Aug 2015 17:04:33 +0200 Parents: 13567d5dee28fba9a434a3af7691a574c2e52720 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=2af19fb50a593faaba53a8b0980bae93e89fbbb2 Log: Fix leak in previous commit Turns out zend_update_property_str already does the copy implicitly. Changed paths: M Zend/zend_exceptions.c Diff: diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c index 53a4ac2..d7df5df 100644 --- a/Zend/zend_exceptions.c +++ b/Zend/zend_exceptions.c @@ -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);

« previous php.cvs (#88536) next »