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--; }