summaryrefslogtreecommitdiff
path: root/sapi/phpdbg/phpdbg_watch.c
diff options
context:
space:
mode:
Diffstat (limited to 'sapi/phpdbg/phpdbg_watch.c')
-rw-r--r--sapi/phpdbg/phpdbg_watch.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sapi/phpdbg/phpdbg_watch.c b/sapi/phpdbg/phpdbg_watch.c
index 0359b5a7de..2efbb1237c 100644
--- a/sapi/phpdbg/phpdbg_watch.c
+++ b/sapi/phpdbg/phpdbg_watch.c
@@ -464,9 +464,9 @@ PHPDBG_WATCH(array) /* {{{ */
void phpdbg_watch_HashTable_dtor(zval **zv) {
phpdbg_btree_result *result;
- zval_ptr_dtor_wrapper(zv);
TSRMLS_FETCH();
+ zval_ptr_dtor_wrapper(zv);
if ((result = phpdbg_btree_find(&PHPDBG_G(watchpoint_tree), (zend_ulong)*zv))) {
phpdbg_watchpoint_t *watch = result->ptr;
@@ -772,9 +772,11 @@ void phpdbg_list_watchpoints(TSRMLS_D) {
}
void phpdbg_watch_efree(void *ptr) {
- phpdbg_btree_result *result = phpdbg_btree_find_closest(&PHPDBG_G(watchpoint_tree), (zend_ulong)ptr);
+ phpdbg_btree_result *result;
TSRMLS_FETCH();
+ result = phpdbg_btree_find_closest(&PHPDBG_G(watchpoint_tree), (zend_ulong)ptr);
+
if (result) {
phpdbg_watchpoint_t *watch = result->ptr;