- Fix memory leak in the following code (Dmitry):

<?php
$a = array();
$a .= "x";
?>
This commit is contained in:
Andi Gutmans 2004-03-14 13:14:48 +00:00
parent 52cd980702
commit 4f897b2f3c

View File

@ -1088,6 +1088,12 @@ ZEND_API int concat_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
zend_make_printable_zval(op2, &op2_copy, &use_copy2);
if (use_copy1) {
/* We have created a converted copy of op1. Therefore, op1 won't become the result so
* we have to free it.
*/
if (result == op1) {
zval_dtor(op1);
}
op1 = &op1_copy;
}
if (use_copy2) {