diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-04-12 11:20:29 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-04-12 11:46:03 +0200 |
commit | c09b63595ef7edcaae6638932dceae531c26c3cf (patch) | |
tree | de1ca460f46c47475a6a9989e0822f100f19e9f8 /sapi/phpdbg/phpdbg_info.c | |
parent | 88bfd2ae98fb163f4b8789b0cb41f7c01eff7c3f (diff) | |
download | php-git-c09b63595ef7edcaae6638932dceae531c26c3cf.tar.gz |
Fix potentially uninitialized warnings in phpdbg
Diffstat (limited to 'sapi/phpdbg/phpdbg_info.c')
-rw-r--r-- | sapi/phpdbg/phpdbg_info.c | 8 |
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) { |