diff --git a/src/vppinfra/mem.h b/src/vppinfra/mem.h
index 14b2761..d4819b7 100644
--- a/src/vppinfra/mem.h
+++ b/src/vppinfra/mem.h
@@ -53,6 +53,7 @@
 
 #include <vppinfra/os.h>
 #include <vppinfra/string.h>	/* memcpy, clib_memset */
+#include <vppinfra/sanitizer.h>
 
 #define CLIB_MAX_MHEAPS 256
 
@@ -96,6 +97,17 @@
   return old;
 }
 
+always_inline uword
+clib_mem_size_nocheck (void *p)
+{
+#if USE_DLMALLOC == 0
+  mheap_elt_t *e = mheap_user_pointer_to_elt (p);
+  return mheap_elt_data_bytes (e);
+#else
+  return mspace_usable_size_with_delta (p);
+#endif
+}
+
 /* Memory allocator which may call os_out_of_memory() if it fails */
 always_inline void *
 clib_mem_alloc_aligned_at_offset (uword size, uword align, uword align_offset,
@@ -119,29 +131,21 @@
   uword offset;
   heap = mheap_get_aligned (heap, size, align, align_offset, &offset);
   clib_per_cpu_mheaps[cpu] = heap;
-
-  if (offset != ~0)
-    {
-      p = heap + offset;
-      return p;
-    }
-  else
-    {
-      if (os_out_of_memory_on_failure)
-	os_out_of_memory ();
-      return 0;
-    }
+  if (PREDICT_TRUE (offset != ~0))
+    p = heap + offset;
 #else
   p = mspace_get_aligned (heap, size, align, align_offset);
-  if (PREDICT_FALSE (p == 0))
+#endif /* USE_DLMALLOC */
+
+  if (PREDICT_FALSE (0 == p))
     {
       if (os_out_of_memory_on_failure)
 	os_out_of_memory ();
       return 0;
     }
 
+  CLIB_MEM_UNPOISON (p, size);
   return p;
-#endif /* USE_DLMALLOC */
 }
 
 /* Memory allocator which calls os_out_of_memory() when it fails */
@@ -226,6 +230,8 @@
   /* Make sure object is in the correct heap. */
   ASSERT (clib_mem_is_heap_object (p));
 
+  CLIB_MEM_POISON (p, clib_mem_size_nocheck (p));
+
 #if USE_DLMALLOC == 0
   mheap_put (heap, (u8 *) p - heap);
 #else
@@ -254,20 +260,15 @@
 always_inline uword
 clib_mem_size (void *p)
 {
-#if USE_DLMALLOC == 0
-  mheap_elt_t *e = mheap_user_pointer_to_elt (p);
   ASSERT (clib_mem_is_heap_object (p));
-  return mheap_elt_data_bytes (e);
-#else
-  ASSERT (clib_mem_is_heap_object (p));
-  return mspace_usable_size_with_delta (p);
-#endif
+  return clib_mem_size_nocheck (p);
 }
 
 always_inline void
 clib_mem_free_s (void *p)
 {
   uword size = clib_mem_size (p);
+  CLIB_MEM_UNPOISON (p, size);
   memset_s_inline (p, size, 0, size);
   clib_mem_free (p);
 }
