diff options
author | Bob Weinand <bobwei9@hotmail.com> | 2014-02-06 21:31:40 +0100 |
---|---|---|
committer | Bob Weinand <bobwei9@hotmail.com> | 2014-02-06 21:31:40 +0100 |
commit | 363ff60475d93716722034b8f7a2486229bf4cfb (patch) | |
tree | 5403c4bebaa94029aeeb3f83c6d417ac67346c41 /Zend/zend_operators.c | |
parent | 7a022da23b44ea932295dad8a155a59942ebd3da (diff) | |
download | php-git-363ff60475d93716722034b8f7a2486229bf4cfb.tar.gz |
Fixed memory leak in pow operator
Diffstat (limited to 'Zend/zend_operators.c')
-rw-r--r-- | Zend/zend_operators.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index 03dbb15264..f022909bc3 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -1026,12 +1026,14 @@ ZEND_API int pow_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) ZEND_TRY_BINARY_OBJECT_OPERATION(ZEND_POW); if (Z_TYPE_P(op1) == IS_ARRAY) { - ZVAL_LONG(op1, 0); + ZVAL_LONG(result, 0); + return SUCCESS; } else { zendi_convert_scalar_to_number(op1, op1_copy, result); } if (Z_TYPE_P(op2) == IS_ARRAY) { - ZVAL_LONG(op2, 0); + ZVAL_LONG(result, 1L); + return SUCCESS; } else { zendi_convert_scalar_to_number(op2, op2_copy, result); } |