From: wessels <> Date: Fri, 25 Apr 1997 23:44:55 +0000 (+0000) Subject: fix SwapDirs allocation X-Git-Tag: SQUID_3_0_PRE1~5053 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8a2bda74101966965067e9fcad175577435262e4;p=thirdparty%2Fsquid.git fix SwapDirs allocation --- diff --git a/src/store_dir.cc b/src/store_dir.cc index 434c73f39a..6b6f35796d 100644 --- a/src/store_dir.cc +++ b/src/store_dir.cc @@ -59,11 +59,11 @@ storeAddSwapDisk(const char *path, int size, int l1, int l2, int read_only) fatal_dump("cache_dir pathname is too long"); if (SwapDirs == NULL) { SwapDirsAllocated = 4; - SwapDirs = xcalloc(SwapDirsAllocated, sizeof(SwapDir *)); + SwapDirs = xcalloc(SwapDirsAllocated, sizeof(SwapDir)); } if (SwapDirsAllocated == ncache_dirs) { SwapDirsAllocated <<= 1; - tmp = xcalloc(SwapDirsAllocated, sizeof(SwapDir *)); + tmp = xcalloc(SwapDirsAllocated, sizeof(SwapDir)); for (i = 0; i < ncache_dirs; i++) tmp[i] = SwapDirs[i]; xfree(SwapDirs);