Module Name: src
Committed By: christos
Date: Sun Jan 17 14:50:31 UTC 2016
Modified Files:
src/usr.sbin/lpr/pac: pac.c
Log Message:
PR/50666: David Binderman:
He's out of jail and out of bail and that's the way it goes:
free(base);
To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/usr.sbin/lpr/pac/pac.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.sbin/lpr/pac/pac.c
diff -u src/usr.sbin/lpr/pac/pac.c:1.23 src/usr.sbin/lpr/pac/pac.c:1.24
--- src/usr.sbin/lpr/pac/pac.c:1.23 Tue Aug 30 15:27:37 2011
+++ src/usr.sbin/lpr/pac/pac.c Sun Jan 17 09:50:31 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: pac.c,v 1.23 2011/08/30 19:27:37 joerg Exp $ */
+/* $NetBSD: pac.c,v 1.24 2016/01/17 14:50:31 christos Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -37,7 +37,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 19
#if 0
static char sccsid[] = "@(#)pac.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: pac.c,v 1.23 2011/08/30 19:27:37 joerg Exp $");
+__RCSID("$NetBSD: pac.c,v 1.24 2016/01/17 14:50:31 christos Exp $");
#endif
#endif /* not lint */
@@ -255,7 +255,7 @@ dumpit(void)
hp = hashtab[0];
hno = 1;
- base = (struct hent **) calloc(sizeof hp, hcount);
+ base = calloc(sizeof hp, hcount);
if (base == NULL)
err(1, "calloc");
for (ap = base, c = hcount; c--; ap++) {
@@ -284,6 +284,7 @@ dumpit(void)
printf("Sum:%7.2f %4d $%7.2f\n", feet, runs,
feet * price * runs);
}
+ free(base);
}
/*