aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/vppinfra/dlmalloc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/vppinfra/dlmalloc.c b/src/vppinfra/dlmalloc.c
index 8ae92cf566c..1bc8f656b66 100644
--- a/src/vppinfra/dlmalloc.c
+++ b/src/vppinfra/dlmalloc.c
@@ -4271,6 +4271,14 @@ void mspace_put (mspace msp, void *p_arg)
mheap_put_trace ((u64)p_arg, psize);
}
+#if CLIB_DEBUG > 0
+ /* Poison the object */
+ {
+ size_t psize = mspace_usable_size (object_header);
+ memset (object_header, 0x13, psize);
+ }
+#endif
+
/* And free it... */
mspace_free (msp, object_header);
}