fix double free (closes: #711045)
authorMichael Vogt <mvo@debian.org>
Thu, 6 Jun 2013 16:17:14 +0000 (18:17 +0200)
committerMichael Vogt <mvo@debian.org>
Thu, 6 Jun 2013 16:17:14 +0000 (18:17 +0200)
apt-pkg/contrib/fileutl.cc
debian/changelog

index f18e170..4666188 100644 (file)
@@ -1424,8 +1424,11 @@ bool FileFd::Seek(unsigned long long To)
         return _error->Error("Reopen is only implemented for read-only files!");
       }
 #ifdef HAVE_BZ2
-      if (d->bz2 != NULL)
-        BZ2_bzclose(d->bz2);
+     if (d->bz2 != NULL) 
+     {
+       BZ2_bzclose(d->bz2);
+       d->bz2 = NULL;
+     }
 #endif
       if (iFd != -1)
         close(iFd);
index f5be97b..f0eb042 100644 (file)
@@ -9,6 +9,9 @@ apt (0.9.8.2) UNRELEASED; urgency=low
   [ Michael Vogt ]
   * buildlib/apti18n.h.in:
     - fix build failure when building without NLS (closes: #671587)
+  
+  [ Gregoire Menuel ]
+  * fix double free (closes: #711045)
 
  -- Christian Perrier <bubulle@debian.org>  Thu, 16 May 2013 22:28:22 +0200