summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/memory.c2
-rw-r--r--lib/memory.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/memory.c b/lib/memory.c
index fb0e8d0d..5ee33aa8 100644
--- a/lib/memory.c
+++ b/lib/memory.c
@@ -587,7 +587,7 @@ DEFUN_CALL (show_memory_summary,
LOCK ;
for (mtype = 1 ; mtype < MTYPE_MAX ; ++mtype)
- alloc += mstat[mtype] ;
+ alloc += mstat.mt[mtype].alloc ;
UNLOCK
vty_out(vty, "%ld items allocated%s", alloc, VTY_NEWLINE) ;
diff --git a/lib/memory.h b/lib/memory.h
index d67e865b..6c95d73a 100644
--- a/lib/memory.h
+++ b/lib/memory.h
@@ -56,7 +56,9 @@ extern struct mlist mlists[];
mtype_zstrdup (__FILE__, __LINE__, (mtype), (str))
#else
+#ifdef QDEBUG
#define MEMORY_TRACKER 1
+#endif
#ifdef MEMORY_TRACKER
#define MEMORY_TRACKER_NAME , const char* name