From: wessels <> Date: Sun, 14 Apr 1996 09:06:33 +0000 (+0000) Subject: use safe_free everywhere instead of xfree for debugging X-Git-Tag: SQUID_3_0_PRE1~6189 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5c46528b4ba22a4b4e7c521eee58d3746c3ba22f;p=thirdparty%2Fsquid.git use safe_free everywhere instead of xfree for debugging --- diff --git a/src/debug.cc b/src/debug.cc index b92a8126be..e3000a4c31 100644 --- a/src/debug.cc +++ b/src/debug.cc @@ -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) { diff --git a/src/ipcache.cc b/src/ipcache.cc index f2d73dc5d2..3acf3cbe74 100644 --- a/src/ipcache.cc +++ b/src/ipcache.cc @@ -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; }