]> err.no Git - dpkg/commitdiff
Fix small memory leaks
authorSean Finney <seanius@seanius.net>
Sat, 1 Mar 2008 08:44:09 +0000 (09:44 +0100)
committerGuillem Jover <guillem@debian.org>
Wed, 5 Mar 2008 22:42:37 +0000 (00:42 +0200)
ChangeLog
THANKS
debian/changelog
lib/dump.c
src/help.c

index ec9e52d742080c8b17eac8315d9dc986413c3568..fdf49aee176fe19e0b65e20431af240960b71e2f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-03-06  Sean Finney  <seanius@seanius.net>
+
+       * lib/dump.c (writedb): Free newfn and oldfn.
+       * src/help.c (clear_istobes): Free pkgiterator 'it' by calling
+       iterpkgend.
+
 2008-03-02  Raphael Hertzog  <hertzog@debian.org>
 
        * scripts/dpkg-gencontrol.pl, scripts/dpkg-source.pl:
diff --git a/THANKS b/THANKS
index c61d1273da42f55c9cb1978b8691da26d852b042..a6edd73495a2d3a902e5653c4cc793987b2020cd 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -145,6 +145,7 @@ SZERVÁC Attila <sas@321.hu>
 Samuel Thibault <samuel.thibault@ens-lyon.org>
 Scott Barker <scott@mostlylinux.ab.ca>
 Scott James Remnant <scott@netsplit.com>
+Sean Finney <seanius@seanius.net>
 Sergio Gelato <Sergio.Gelato@astro.su.se>
 Stefano Canepa <sc@linux.it>
 Stepan Golosunov <stepan@golosunov.pp.ru>
index 159271c0cdc96668ed46a9dd60ffc9c0a3d7a0f3..8778ff42d59a6eec13f39906421ed1b84ecf2349 100644 (file)
@@ -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
index 9e8bb0de15e4a0593d804725fac20968487d11f1..11547954a9f56efdceb5fe02eac62079acd61936 100644 (file)
@@ -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);
 }
index 3b9bc76c6ce5cf1992df536d026bffdf48255f9f..78e3b29f244e8dde1976491c50c5c528173f6067 100644 (file)
@@ -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, ...) {