]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
close swaplog_fd's in free_swapdir()
authorwessels <>
Thu, 17 Jul 1997 04:56:12 +0000 (04:56 +0000)
committerwessels <>
Thu, 17 Jul 1997 04:56:12 +0000 (04:56 +0000)
replace configFreeMemory() which just calls free_all()

src/cache_cf.cc

index 2a516e2515c414274095fb78b792333852334746..3e28c65defb91c1d04c8bc6c528bdb6e2c728da9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: cache_cf.cc,v 1.211 1997/07/16 20:55:42 wessels Exp $
+ * $Id: cache_cf.cc,v 1.212 1997/07/16 22:56:12 wessels Exp $
  *
  * DEBUG: section 3     Configuration File Parsing
  * AUTHOR: Harvest Derived
@@ -464,6 +464,10 @@ free_cachedir(struct _cacheSwap *swap)
     int i;
     for (i = 0; i < swap->n_configured; i++) {
        s = swap->swapDirs + i;
+       if (s->swaplog_fd > -1) {
+           file_close(s->swaplog_fd);
+           s->swaplog_fd = -1;
+       }
        xfree(s->path);
        filemapFreeMemory(s->map);
     }
@@ -1077,3 +1081,9 @@ parseNeighborType(const char *s)
     debug(15, 0) ("WARNING: Unknown neighbor type: %s\n", s);
     return PEER_SIBLING;
 }
+
+void
+configFreeMemory(void)
+{
+       free_all();
+}