Free the filepackages_iterator also when returning false.
@@ -19,6 +19,7 @@ dpkg (1.16.9) UNRELEASED; urgency=low
* Do not leak subcall command arguments in update-alternatives.
* Fix segfault on update-alternatives when passing --slave without any
action at all. LP: #1037431
+ * Fix memory leak in dpkg filesavespackage().
[ Updated programs translations ]
* Czech (Miroslav Kure).
@@ -170,6 +170,7 @@ filesavespackage(struct fileinlist *file,
/* We've found a package that can take this file. */
debug(dbg_eachfiledetail, "filesavespackage ... taken -- no save");
+ filepackages_iter_free(iter);
return false;
}
filepackages_iter_free(iter);