#ifndef lint
static char copyright[] =
-"$Id: alloc.c,v 1.29 1999/05/07 17:34:30 mellon Exp $ Copyright (c) 1995, 1996, 1998 The Internet Software Consortium. All rights reserved.\n";
+"$Id: alloc.c,v 1.30 1999/05/27 12:38:05 mellon Exp $ Copyright (c) 1995, 1996, 1998 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
#if defined (POINTER_DEBUG)
abort ();
#else
- return 0;
+ *ptr = (struct expression *)0;
#endif
}
*ptr = src;
#if defined (POINTER_DEBUG)
abort ();
#else
- return 0;
+ *ptr = (struct option_cache *)0;
#endif
}
*ptr = src;
#if defined (POINTER_DEBUG)
abort ();
#else
- return 0;
+ *ptr = (struct buffer *)0;
#endif
}
*ptr = bp;
{
struct buffer *bp;
- if (!ptr || !*ptr) {
+ if (!ptr) {
log_error ("Null pointer passed to buffer_dereference: %s",
name);
#if defined (POINTER_DEBUG)
#endif
}
+ if (!*ptr) {
+ log_error ("Null pointer in buffer_dereference: %s", name);
+#if defined (POINTER_DEBUG)
+ abort ();
+#else
+ return 0;
+#endif
+ }
+
(*ptr) -> refcnt--;
if (!(*ptr) -> refcnt)
dfree ((*ptr), name);
#if defined (POINTER_DEBUG)
abort ();
#else
- return 0;
+ *ptr = (struct dns_host_entry *)0;
#endif
}
*ptr = bp;
#if defined (POINTER_DEBUG)
abort ();
#else
- return 0;
+ *ptr = (struct option_state *)0;
#endif
}
#if defined (POINTER_DEBUG)
abort ();
#else
- return 0;
+ *ptr = (struct option_state *)0;
#endif
}
*ptr = bp;