]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
plug some mem leaks
authorwessels <>
Sat, 21 Dec 1996 14:54:50 +0000 (14:54 +0000)
committerwessels <>
Sat, 21 Dec 1996 14:54:50 +0000 (14:54 +0000)
default log_udp to on

src/cache_cf.cc
src/neighbors.cc

index 3f9078e6af60e78d2521e16ff9d1942b6fadb9a8..9935251fc06e595d6cb74f39615a86e8d620d11e 100644 (file)
@@ -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
index b1f56e82af3ab88c8415345a9c40b96fe26d2ca9..910faec0b348f97bb1eb7d3943f69b23e578d210 100644 (file)
@@ -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);
 }