From: wessels <> Date: Sat, 21 Dec 1996 14:54:50 +0000 (+0000) Subject: plug some mem leaks X-Git-Tag: SQUID_3_0_PRE1~5249 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ee4a1f5d1563fade7f1e7e6a47c10fb905adf8ae;p=thirdparty%2Fsquid.git plug some mem leaks default log_udp to on --- diff --git a/src/cache_cf.cc b/src/cache_cf.cc index 3f9078e6af..9935251fc0 100644 --- a/src/cache_cf.cc +++ b/src/cache_cf.cc @@ -1,5 +1,5 @@ /* - * $Id: cache_cf.cc,v 1.160 1996/12/20 23:45:36 wessels Exp $ + * $Id: cache_cf.cc,v 1.161 1996/12/21 07:54:50 wessels Exp $ * * DEBUG: section 3 Configuration File Parsing * AUTHOR: Harvest Derived @@ -198,6 +198,7 @@ struct SquidConfig Config; #define DefaultLevelOneDirs 16 #define DefaultLevelTwoDirs 256 +#define DefaultOptionsLogUdp 1 /* on */ int httpd_accel_mode = 0; /* for fast access */ const char *DefaultSwapDir = DEFAULT_SWAP_DIR; @@ -1474,6 +1475,7 @@ configFreeMemory(void) wordlistDestroy(&Config.mcast_group_list); wordlistDestroy(&Config.inside_firewall_list); wordlistDestroy(&Config.dns_testname_list); + wordlistDestroy(&Config.cache_stoplist); ip_acl_destroy(&Config.local_ip_list); ip_acl_destroy(&Config.firewall_ip_list); objcachePasswdDestroy(&Config.passwd_list); @@ -1573,6 +1575,7 @@ configSetFactoryDefaults(void) Config.Store.objectsPerBucket = DefaultObjectsPerBucket; Config.levelOneDirs = DefaultLevelOneDirs; Config.levelTwoDirs = DefaultLevelTwoDirs; + Config.Options.log_udp = DefaultOptionsLogUdp; } static void diff --git a/src/neighbors.cc b/src/neighbors.cc index b1f56e82af..910faec0b3 100644 --- a/src/neighbors.cc +++ b/src/neighbors.cc @@ -1,5 +1,5 @@ /* - * $Id: neighbors.cc,v 1.103 1996/12/20 23:46:15 wessels Exp $ + * $Id: neighbors.cc,v 1.104 1996/12/21 07:54:52 wessels Exp $ * * DEBUG: section 15 Neighbor Routines * AUTHOR: Harvest Derived @@ -317,8 +317,7 @@ neighborRemove(edge * target) } if (e) { *E = e->next; - safe_free(e->host); - safe_free(e); + edgeDestroy(e); friends.n--; } friends.first_ping = friends.edges_head; @@ -902,8 +901,15 @@ neighborUp(edge * e) void edgeDestroy(edge * e) { + struct _domain_ping *l = NULL; + struct _domain_ping *nl = NULL; if (e == NULL) return; + for (l = e->pinglist; l; l = nl) { + nl = l->next; + safe_free(l->domain); + safe_free(l); + } safe_free(e->host); safe_free(e); }