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 /sapi/phpdbg/phpdbg.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 'sapi/phpdbg/phpdbg.c')
-rw-r--r-- | sapi/phpdbg/phpdbg.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c index ca86a29fcf..89157562c9 100644 --- a/sapi/phpdbg/phpdbg.c +++ b/sapi/phpdbg/phpdbg.c @@ -213,8 +213,8 @@ static PHP_RSHUTDOWN_FUNCTION(phpdbg) /* {{{ */ zend_hash_destroy(&PHPDBG_G(bp)[PHPDBG_BREAK_METHOD]); zend_hash_destroy(&PHPDBG_G(bp)[PHPDBG_BREAK_COND]); zend_hash_destroy(&PHPDBG_G(bp)[PHPDBG_BREAK_MAP]); - zend_hash_destroy(&PHPDBG_G(seek)); zend_hash_destroy(&PHPDBG_G(file_sources)); + zend_hash_destroy(&PHPDBG_G(seek)); zend_hash_destroy(&PHPDBG_G(registered)); zend_hash_destroy(&PHPDBG_G(watchpoints)); zend_llist_destroy(&PHPDBG_G(watchlist_mem)); @@ -234,12 +234,6 @@ static PHP_RSHUTDOWN_FUNCTION(phpdbg) /* {{{ */ PHPDBG_G(oplog) = NULL; } - if (PHPDBG_G(ops)) { - destroy_op_array(PHPDBG_G(ops)); - efree(PHPDBG_G(ops)); - PHPDBG_G(ops) = NULL; - } - if (PHPDBG_G(oplog_list)) { phpdbg_oplog_list *cur = PHPDBG_G(oplog_list); do { @@ -558,8 +552,8 @@ static PHP_FUNCTION(phpdbg_get_executable) phpdbg_file_source *source = zend_hash_find_ptr(&PHPDBG_G(file_sources), name); if (source) { phpdbg_oplog_fill_executable( - source->op_array, - phpdbg_add_empty_array(Z_ARR_P(return_value), source->op_array->filename), + &source->op_array, + phpdbg_add_empty_array(Z_ARR_P(return_value), source->op_array.filename), by_opcode); } } ZEND_HASH_FOREACH_END(); |