summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/memheap.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/memheap.c b/src/memheap.c
index adb5c86053..86e4461675 100644
--- a/src/memheap.c
+++ b/src/memheap.c
@@ -517,6 +517,7 @@ void rt_memheap_free(void *ptr)
/* check magic */
RT_ASSERT((header_ptr->magic & RT_MEMHEAP_MASK) == RT_MEMHEAP_MAGIC);
+ RT_ASSERT(header_ptr->magic & RT_MEMHEAP_USED);
/* check whether this block of memory has been over-written. */
RT_ASSERT((header_ptr->next->magic & RT_MEMHEAP_MASK) == RT_MEMHEAP_MAGIC);