aboutsummaryrefslogtreecommitdiffstats
path: root/src/pdumper.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pdumper.c')
-rw-r--r--src/pdumper.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/pdumper.c b/src/pdumper.c
index c888b659dde..c0b36b1ca44 100644
--- a/src/pdumper.c
+++ b/src/pdumper.c
@@ -4853,11 +4853,14 @@ struct dump_memory_map_heap_control_block
4853static void 4853static void
4854dump_mm_heap_cb_release (struct dump_memory_map_heap_control_block *cb) 4854dump_mm_heap_cb_release (struct dump_memory_map_heap_control_block *cb)
4855{ 4855{
4856 eassert (cb->refcount > 0); 4856 if (cb)
4857 if (--cb->refcount == 0)
4858 { 4857 {
4859 free (cb->mem); 4858 eassert (cb->refcount > 0);
4860 free (cb); 4859 if (--cb->refcount == 0)
4860 {
4861 free (cb->mem);
4862 free (cb);
4863 }
4861 } 4864 }
4862} 4865}
4863 4866