Added silc_buffer_sfree and reorganized silcbuffer.h.
[runtime.git] / lib / silcutil / silcmemory.c
index cd09a903124ba58687c7461b158c99b9f4104f27..62a861659071a3c4f1faf767530cd0adb98f081d 100644 (file)
@@ -92,8 +92,13 @@ void *silc_smalloc(SilcStack stack, SilcUInt32 size)
 
 void silc_sfree(SilcStack stack, void *ptr)
 {
-  if (stack)
+  if (stack) {
+#ifdef SILC_DEBUG
+    if (ptr)
+      *(unsigned char *)ptr = 'F';
+#endif /* SILC_DEBUG */
     return;
+  }
   silc_free(ptr);
 }