From: Sean Finney Date: Sat, 1 Mar 2008 08:44:09 +0000 (+0100) Subject: Fix small memory leaks X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c786c2f044ef7b395bbecac15d79e561e3d66050;p=dpkg Fix small memory leaks --- diff --git a/ChangeLog b/ChangeLog index ec9e52d7..fdf49aee 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-03-06 Sean Finney + + * lib/dump.c (writedb): Free newfn and oldfn. + * src/help.c (clear_istobes): Free pkgiterator 'it' by calling + iterpkgend. + 2008-03-02 Raphael Hertzog * scripts/dpkg-gencontrol.pl, scripts/dpkg-source.pl: diff --git a/THANKS b/THANKS index c61d1273..a6edd734 100644 --- a/THANKS +++ b/THANKS @@ -145,6 +145,7 @@ SZERVÁC Attila Samuel Thibault Scott Barker Scott James Remnant +Sean Finney Sergio Gelato Stefano Canepa Stepan Golosunov diff --git a/debian/changelog b/debian/changelog index 159271c0..8778ff42 100644 --- a/debian/changelog +++ b/debian/changelog @@ -17,6 +17,8 @@ dpkg (1.14.17) UNRELEASED; urgency=low * Change dpkg-gencontrol to not output the Homapage field on udeb. * Reintroduce 'no-debsig' back in dpkg.cfg to avoid failing to install any package when debsig-verify is installed. Closes: #311843 + * Fix some small memory leaks. Closes: #469520 + Thanks to Sean Finney. [ Raphael Hertzog ] * Add a warning displayed by dpkg-genchanges if the current version is diff --git a/lib/dump.c b/lib/dump.c index 9e8bb0de..11547954 100644 --- a/lib/dump.c +++ b/lib/dump.c @@ -325,4 +325,6 @@ void writedb(const char *filename, int available, int mustsync) { if (rename(newfn,filename)) ohshite(_("failed to install `%.250s' as `%.250s' containing %s info"), newfn, filename, which); + free(newfn); + free(oldfn); } diff --git a/src/help.c b/src/help.c index 3b9bc76c..78e3b29f 100644 --- a/src/help.c +++ b/src/help.c @@ -400,6 +400,7 @@ void clear_istobes(void) { pkg->clientdata->istobe= itb_normal; pkg->clientdata->replacingfilesandsaid= 0; } + iterpkgend(it); } void debug(int which, const char *fmt, ...) {