From 6b5163a2a38c95fb3dd13b23fd1911b87889dbaa Mon Sep 17 00:00:00 2001 From: adilger Date: Mon, 21 Oct 2002 21:31:04 +0000 Subject: [PATCH] A little debugging I've been running in my tree for a long time. It caught a couple of minor bugs, and should prevent more in the future. --- lustre/include/linux/obd_support.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lustre/include/linux/obd_support.h b/lustre/include/linux/obd_support.h index 3c11ffd..724a8e2 100644 --- a/lustre/include/linux/obd_support.h +++ b/lustre/include/linux/obd_support.h @@ -164,10 +164,12 @@ do { \ #define OBD_FREE(ptr, size) \ do { \ int s = (size); \ + LASSERT(ptr); \ kfree((ptr)); \ obd_memory -= s; \ CDEBUG(D_MALLOC, "kfreed '" #ptr "': %d at %p (tot %ld).\n", \ s, (ptr), obd_memory); \ + (ptr) = (void *)0xdeadbeef; \ } while (0) #endif -- 1.8.3.1