diff options
| author | Bob Weinand <bobwei9@hotmail.com> | 2015-08-04 00:00:10 +0200 |
|---|---|---|
| committer | Bob Weinand <bobwei9@hotmail.com> | 2015-08-04 00:00:10 +0200 |
| commit | d8fe645db444e54fcc8b2555c08a5021c17ca2d3 (patch) | |
| tree | d2185eecbadddafeddae9d061a105b0663fe9dec /Zend/zend_opcode.c | |
| parent | b20953118ba41cd9465ccc84e79b6eef3f539573 (diff) | |
| download | php-git-d8fe645db444e54fcc8b2555c08a5021c17ca2d3.tar.gz | |
Fix valgrind errors in phpdbg
Revert "We cannot safely assume that all op array will be refcount 0 after execution"
This reverts commit b6936adb58288a0606ed847802d9226cddb41e2b.
This change turns out to not have been a clever idea and was causing more weirdness than it helped...
Diffstat (limited to 'Zend/zend_opcode.c')
| -rw-r--r-- | Zend/zend_opcode.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/Zend/zend_opcode.c b/Zend/zend_opcode.c index da401e17b9..347761e9a8 100644 --- a/Zend/zend_opcode.c +++ b/Zend/zend_opcode.c @@ -335,7 +335,7 @@ void zend_class_add_ref(zval *zv) ce->refcount++; } -ZEND_API zend_bool destroy_op_array(zend_op_array *op_array) +ZEND_API void destroy_op_array(zend_op_array *op_array) { zval *literal = op_array->literals; zval *end; @@ -353,12 +353,8 @@ ZEND_API zend_bool destroy_op_array(zend_op_array *op_array) op_array->run_time_cache = NULL; } - if (!op_array->refcount) { - return 1; - } - - if (--(*op_array->refcount) > 0) { - return 0; + if (!op_array->refcount || --(*op_array->refcount) > 0) { + return; } efree_size(op_array->refcount, sizeof(*(op_array->refcount))); @@ -419,8 +415,6 @@ ZEND_API zend_bool destroy_op_array(zend_op_array *op_array) } efree(arg_info); } - - return 1; } void init_op(zend_op *op) |
