summaryrefslogtreecommitdiff
path: root/sapi/phpdbg/phpdbg_info.c
diff options
context:
space:
mode:
Diffstat (limited to 'sapi/phpdbg/phpdbg_info.c')
-rw-r--r--sapi/phpdbg/phpdbg_info.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sapi/phpdbg/phpdbg_info.c b/sapi/phpdbg/phpdbg_info.c
index 167ada399a..bcec3361fc 100644
--- a/sapi/phpdbg/phpdbg_info.c
+++ b/sapi/phpdbg/phpdbg_info.c
@@ -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) {