From: wessels <> Date: Thu, 17 Jul 1997 04:56:12 +0000 (+0000) Subject: close swaplog_fd's in free_swapdir() X-Git-Tag: SQUID_3_0_PRE1~4875 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f150dd4bd6a93142c7d41ece54c2c9ec59c1f75e;p=thirdparty%2Fsquid.git close swaplog_fd's in free_swapdir() replace configFreeMemory() which just calls free_all() --- diff --git a/src/cache_cf.cc b/src/cache_cf.cc index 2a516e2515..3e28c65def 100644 --- a/src/cache_cf.cc +++ b/src/cache_cf.cc @@ -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(); +}