From: adilger Date: Mon, 21 Oct 2002 21:31:04 +0000 (+0000) Subject: A little debugging I've been running in my tree for a long time. X-Git-Tag: 0.5.15~30 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=6b5163a2a38c95fb3dd13b23fd1911b87889dbaa;p=fs%2Flustre-release.git 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. --- 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