free the mpool structure on close, don't free pages anymore, they're
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Mon, 25 Nov 1991 03:06:20 +0000 (19:06 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Mon, 25 Nov 1991 03:06:20 +0000 (19:06 -0800)
allocated as part of the header

SCCS-vsn: lib/libc/db/mpool/mpool.c 5.3

usr/src/lib/libc/db/mpool/mpool.c

index f8e6d82..da1db6c 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)mpool.c    5.2 (Berkeley) %G%";
+static char sccsid[] = "@(#)mpool.c    5.3 (Berkeley) %G%";
 #endif /* LIBC_SCCS and not lint */
 
 #include <sys/param.h>
 #endif /* LIBC_SCCS and not lint */
 
 #include <sys/param.h>
@@ -270,9 +270,9 @@ mpool_close(mp)
        /* Free up any space allocated to the lru pages. */
        for (b = mp->lru.cprev; b != (BKT *)&mp->lru; b = next) {
                next = b->cprev;
        /* Free up any space allocated to the lru pages. */
        for (b = mp->lru.cprev; b != (BKT *)&mp->lru; b = next) {
                next = b->cprev;
-               free(b->page);
                free(b);
        }
                free(b);
        }
+       free(mp);
        return (RET_SUCCESS);
 }
 
        return (RET_SUCCESS);
 }