Procházet zdrojové kódy

dpkg: Do not leak the filepackages_iterator in dir_is_used_by_others()

Warned-by: coverity
Guillem Jover před 12 roky
rodič
revize
b678871522
2 změnil soubory, kde provedl 3 přidání a 0 odebrání
  1. 2 0
      debian/changelog
  2. 1 0
      src/help.c

+ 2 - 0
debian/changelog

@@ -5,6 +5,8 @@ dpkg (1.17.9) UNRELEASED; urgency=low
     Unconditionally fixes CVE-2014-0471.
   * Switch alternative database backups from xz to gzip. Closes: #746354
   * Do not leak long tar names on bogus or truncated archives.
+  * Do not leak the filepackages iterator when a directory is used by other
+    packages.
 
   [ Updated scripts translations ]
   * French (Steve Petruzzello). Closes: #746350

+ 1 - 0
src/help.c

@@ -257,6 +257,7 @@ dir_is_used_by_others(struct filenamenode *file, struct pkginfo *pkg)
     if (other_pkg == pkg)
       continue;
 
+    filepackages_iter_free(iter);
     debug(dbg_veryverbose, "dir_is_used_by_others yes");
     return true;
   }