summaryrefslogtreecommitdiff
path: root/lib/memory.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/memory.c')
-rw-r--r--lib/memory.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/memory.c b/lib/memory.c
index f17915486c..b1dc01ed97 100644
--- a/lib/memory.c
+++ b/lib/memory.c
@@ -40,6 +40,7 @@ mt_count_alloc (struct memtype *mt, size_t size)
static inline void
mt_count_free (struct memtype *mt)
{
+ assert(mt->n_alloc);
mt->n_alloc--;
}