]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
fix SwapDirs allocation
authorwessels <>
Fri, 25 Apr 1997 23:44:55 +0000 (23:44 +0000)
committerwessels <>
Fri, 25 Apr 1997 23:44:55 +0000 (23:44 +0000)
src/store_dir.cc

index 434c73f39a3663840f7cd4c125774b8355af526b..6b6f35796d5c08c3e905326635de92c2851dff60 100644 (file)
@@ -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);