diff options
| author | Lou Berger <lberger@labn.net> | 2017-01-27 07:46:25 -0500 |
|---|---|---|
| committer | Lou Berger <lberger@labn.net> | 2017-01-27 07:46:25 -0500 |
| commit | fd7aa3f557b7a17cda20fd63e2c1445b15104d83 (patch) | |
| tree | a892b1b44e598f18ce31a4a9bdc382864dbf4271 /lib/memory.c | |
| parent | e292fcc471f682c3c18dd3f7a42ad723a84a6b05 (diff) | |
lib: assert on duplicate free (count)
Signed-off-by: Lou Berger <lberger@labn.net>
Diffstat (limited to 'lib/memory.c')
| -rw-r--r-- | lib/memory.c | 1 |
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--; } |
