]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
use safe_free everywhere instead of xfree for debugging
authorwessels <>
Sun, 14 Apr 1996 09:06:33 +0000 (09:06 +0000)
committerwessels <>
Sun, 14 Apr 1996 09:06:33 +0000 (09:06 +0000)
src/debug.cc
src/ipcache.cc

index b92a8126becb05d2dc92dbd2e19b3ac0cae3bc99..e3000a4c31d0aafe17f16be36f9232b18d9b9aaf 100644 (file)
@@ -1,5 +1,5 @@
 
-/* $Id: debug.cc,v 1.12 1996/04/08 18:39:29 wessels Exp $ */
+/* $Id: debug.cc,v 1.13 1996/04/14 03:06:33 wessels Exp $ */
 
 #include "squid.h"
 
@@ -110,7 +110,7 @@ static void debugOpenLog(logfile)
        return;
     }
     if (debug_log_file)
-       free(debug_log_file);
+       xfree(debug_log_file);
     debug_log_file = xstrdup(logfile); /* keep a static copy */
     debug_log = fopen(logfile, "a+");
     if (!debug_log) {
index f2d73dc5d241a94371cbfa5c9bb87030c15156eb..3acf3cbe74dc31c06d786ac7e2e45839d5a7dafb 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: ipcache.cc,v 1.22 1996/04/12 04:34:17 wessels Exp $ */
+/* $Id: ipcache.cc,v 1.23 1996/04/14 03:06:34 wessels Exp $ */
 
 /*
  * DEBUG: Section 14          ipcache: IP Cache
@@ -1203,26 +1203,26 @@ int ipcache_unregister(name, fd)
        if (p->next) {
            /* there is something along the line */
            e->pending_head = p->next;
-           free(p->data);
-           free(p);
+           safe_free(p->data);
+           safe_free(p);
        } else {
            /* it is the only entry */
            e->pending_head = e->pending_tail = NULL;
-           free(p->data);
-           free(p);
+           safe_free(p->data);
+           safe_free(p);
        }
     } else if (p == e->pending_tail) {
        /* it's at the tail */
        e->pending_tail = q;
        q->next = NULL;
-       free(p->data);
-       free(p);
+       safe_free(p->data);
+       safe_free(p);
     } else {
        /* it's in the middle */
        /* skip it in the list */
        q->next = p->next;
-       free(p->data);
-       free(p);
+       safe_free(p->data);
+       safe_free(p);
     }
     return 1;
 }