diff options
Diffstat (limited to 'sapi/phpdbg/phpdbg_info.c')
| -rw-r--r-- | sapi/phpdbg/phpdbg_info.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sapi/phpdbg/phpdbg_info.c b/sapi/phpdbg/phpdbg_info.c index 146a45681b..bcec3361fc 100644 --- a/sapi/phpdbg/phpdbg_info.c +++ b/sapi/phpdbg/phpdbg_info.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 7 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -343,11 +343,11 @@ PHPDBG_INFO(literal) /* {{{ */ PHPDBG_INFO(memory) /* {{{ */ { size_t used, real, peak_used, peak_real; - zend_mm_heap *heap; + zend_mm_heap *orig_heap = NULL; zend_bool is_mm; if (PHPDBG_G(flags) & PHPDBG_IN_SIGNAL_HANDLER) { - heap = zend_mm_set_heap(phpdbg_original_heap_sigsafe_mem()); + orig_heap = zend_mm_set_heap(phpdbg_original_heap_sigsafe_mem()); } if ((is_mm = is_zend_mm())) { used = zend_memory_usage(0); @@ -355,8 +355,8 @@ PHPDBG_INFO(memory) /* {{{ */ peak_used = zend_memory_peak_usage(0); peak_real = zend_memory_peak_usage(1); } - if (PHPDBG_G(flags) & PHPDBG_IN_SIGNAL_HANDLER) { - zend_mm_set_heap(heap); + if (orig_heap) { + zend_mm_set_heap(orig_heap); } if (is_mm) { |
