]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
check for putting NULL pointers
authorwessels <>
Tue, 27 Aug 1996 11:17:50 +0000 (11:17 +0000)
committerwessels <>
Tue, 27 Aug 1996 11:17:50 +0000 (11:17 +0000)
src/stmem.cc

index 93ad5f08e30cd7cb21ca6a080dede128899e7573..254f0d92e8c51a1b05f75f7d1da5cf7ca475397a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: stmem.cc,v 1.18 1996/08/21 20:11:56 wessels Exp $
+ * $Id: stmem.cc,v 1.19 1996/08/27 05:17:50 wessels Exp $
  *
  * DEBUG: section 19    Memory Primitives
  * AUTHOR: Harvest Derived
@@ -420,6 +420,8 @@ static void put_free_thing(thing, p)
      stmem_stats *thing;
      void *p;
 {
+    if (p == NULL)
+       fatal_dump("Somebody is putting a NULL pointer!");
     thing->n_pages_in_use--;
     if (thing->total_pages_allocated > thing->max_pages) {
        xfree(p);