瀏覽代碼

Release the package iterators when done

This is a cause of memory leaks, but in these cases the program is about
to exit anyway, so we do it for correctness.
Guillem Jover 16 年之前
父節點
當前提交
1d647dd23c
共有 2 個文件被更改,包括 4 次插入0 次删除
  1. 2 0
      dselect/pkglist.cc
  2. 2 0
      src/enquiry.c

+ 2 - 0
dselect/pkglist.cc

@@ -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;

+ 2 - 0
src/enquiry.c

@@ -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;