mirror of
https://github.com/php/php-src.git
synced 2024-11-26 19:33:55 +08:00
- Fix memory leak in the following code (Dmitry):
<?php $a = array(); $a .= "x"; ?>
This commit is contained in:
parent
52cd980702
commit
4f897b2f3c
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user