ソースを参照

Fix memory leaks due to not destroying pkg iterators

Guillem Jover 17 年 前
コミット
aeac662959
共有3 個のファイルを変更した3 個の追加0 個の削除を含む
  1. 1 0
      debian/changelog
  2. 1 0
      src/depcon.c
  3. 1 0
      src/trigproc.c

+ 1 - 0
debian/changelog

@@ -7,6 +7,7 @@ dpkg (1.15.2) UNRELEASED; urgency=low
     Thanks to Sven Joachim <svenjoac@gmx.de>.
     Thanks to Sven Joachim <svenjoac@gmx.de>.
   * Fix bashism (“echo -e”) in dselect disk setup method. Closes: #530071
   * Fix bashism (“echo -e”) in dselect disk setup method. Closes: #530071
   * Properly parse fdisk output in dselect disk setup method.
   * Properly parse fdisk output in dselect disk setup method.
+  * Fix memory leaks due to not destroying some pkg iterators.
 
 
   [ Updated dpkg translations ]
   [ Updated dpkg translations ]
   * Asturian (Marcos Alvarez Costales). Closes: #529889
   * Asturian (Marcos Alvarez Costales). Closes: #529889

+ 1 - 0
src/depcon.c

@@ -153,6 +153,7 @@ int findbreakcycle(struct pkginfo *pkg) {
   for (iter = iterpkgstart(); (tpkg=iterpkgnext(iter)); ) {
   for (iter = iterpkgstart(); (tpkg=iterpkgnext(iter)); ) {
     tpkg->color = white;
     tpkg->color = white;
   }
   }
+  iterpkgend(iter);
 
 
   return findbreakcyclerecursive(pkg, NULL);
   return findbreakcyclerecursive(pkg, NULL);
 }
 }

+ 1 - 0
src/trigproc.c

@@ -177,6 +177,7 @@ check_trigger_cycle(struct pkginfo *processing_now)
 		tcpp->next = tcn->pkgs;
 		tcpp->next = tcn->pkgs;
 		tcn->pkgs = tcpp;
 		tcn->pkgs = tcpp;
 	}
 	}
+	iterpkgend(it);
 	if (!hare) {
 	if (!hare) {
 		debug(dbg_triggersdetail, "check_triggers_cycle pnow=%s first",
 		debug(dbg_triggersdetail, "check_triggers_cycle pnow=%s first",
 		      processing_now->name);
 		      processing_now->name);