The following commit has been merged in the master branch:
commit aeac662959cb1aa129a2a188dafdd896a6e05888
Author: Guillem Jover <[email protected]>
Date:   Mon May 25 08:03:29 2009 +0200

    Fix memory leaks due to not destroying pkg iterators

diff --git a/debian/changelog b/debian/changelog
index 81d3056..f096d73 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,7 @@ dpkg (1.15.2) UNRELEASED; urgency=low
     Thanks to Sven Joachim <[email protected]>.
   * Fix bashism (“echo -e”) in dselect disk setup method. Closes: #530071
   * Properly parse fdisk output in dselect disk setup method.
+  * Fix memory leaks due to not destroying some pkg iterators.
 
   [ Updated dpkg translations ]
   * Asturian (Marcos Alvarez Costales). Closes: #529889
diff --git a/src/depcon.c b/src/depcon.c
index 7c6f338..cee0a2c 100644
--- a/src/depcon.c
+++ b/src/depcon.c
@@ -153,6 +153,7 @@ int findbreakcycle(struct pkginfo *pkg) {
   for (iter = iterpkgstart(); (tpkg=iterpkgnext(iter)); ) {
     tpkg->color = white;
   }
+  iterpkgend(iter);
 
   return findbreakcyclerecursive(pkg, NULL);
 }
diff --git a/src/trigproc.c b/src/trigproc.c
index 5c4b032..59fb4cf 100644
--- a/src/trigproc.c
+++ b/src/trigproc.c
@@ -177,6 +177,7 @@ check_trigger_cycle(struct pkginfo *processing_now)
                tcpp->next = tcn->pkgs;
                tcn->pkgs = tcpp;
        }
+       iterpkgend(it);
        if (!hare) {
                debug(dbg_triggersdetail, "check_triggers_cycle pnow=%s first",
                      processing_now->name);

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to