This is a cause of memory leaks, but in these cases the program is about to exit anyway, so we do it for correctness.
@@ -417,6 +417,8 @@ packagelist::packagelist(keybindings *kb) : baselist(kb) {
table[nitems]= state;
nitems++;
}
+ iterpkgend(iter);
+
if (!nitems)
ohshit(_("There are no packages."));
recursive= 0;
@@ -347,6 +347,8 @@ void predeppackage(const char *const *argv) {
pkg->clientdata->istobe= itb_normal;
/* If dep is NULL we go and get the next package. */
+ iterpkgend(it);
if (!dep) exit(1); /* Not found */
assert(pkg);
startpkg= pkg;