From: Adam Heath Date: Fri, 29 Dec 2000 00:46:28 +0000 (+0000) Subject: Fix minor memleak in used function hashreport. Thanks to Adrian Bridgett X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d8c42519387c1ae72e0aa9d4831eb2d6d60e4419;p=dpkg Fix minor memleak in used function hashreport. Thanks to Adrian Bridgett . --- diff --git a/ChangeLog b/ChangeLog index 3200cda7..98dbae1d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Dec 28 18:43:37 CST 2000 Adam Heath + + * lib/database.c: Fix minor memleak in used function hashreport. + Thanks to Adrian Bridgett . + Wed Dec 27 14:54:55 CST 2000 Adam Heath * lib/parse.c: Removed use of getc(), and instead use pointers diff --git a/lib/database.c b/lib/database.c index 2d7486f5..2ca9c58d 100644 --- a/lib/database.c +++ b/lib/database.c @@ -236,6 +236,7 @@ void hashreport(FILE *file) { for (i=npackages; i>0 && freq[i]==0; i--); while (i>=0) { fprintf(file,_("size %7d occurs %5d times\n"),i,freq[i]); i--; } if (ferror(file)) ohshite(_("failed write during hashreport")); + free(freq); } /* @@ -257,10 +258,3 @@ void hashreport(FILE *file) { * xgames xherc xmach32 xmach8 xmono xnet xs3 xsvga xtexstuff xv * xvga16 xxgdb zip */ - - - - - - -