2005-04-07 Erez Zadok <ezk@cs.sunysb.edu>
+ * include/am_utils.h (XFREE): XFREE() should nullify the pointer
+ even when compiling without debugging. It's safer this way.
+
* libamu/xutil.c (am_set_hostname),
hlfsd/stubs.c (nfsproc_lookup_2_svc),
fsinfo/fsinfo.c (fsi_get_args),
* SUCH DAMAGE.
*
*
- * $Id: am_utils.h,v 1.64 2005/04/07 03:50:41 ezk Exp $
+ * $Id: am_utils.h,v 1.65 2005/04/07 23:31:07 ezk Exp $
*
*/
#else /* not DEBUG */
/*
- * if not debugging, then simple perform free, and don't bother
- * resetting the pointer.
+ * If not debugging, then also reset the pointer.
+ * It's safer -- and besides, free() should do that anyway.
*/
-# define XFREE(x) free(x)
+# define XFREE(x) do { free((voidp)x); x = NULL;} while (0)
#define amuDebug(x) (0)