summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2013-06-06 18:17:14 +0200
committerMichael Vogt <mvo@debian.org>2013-06-06 18:17:14 +0200
commite3b402f40373365e169f30d276e467f708074ffc (patch)
treefefb559c33eee0f10ef994e9f4560b90b5621450 /apt-pkg
parentf431dc624a04b9280ddd5a6a839adc25ad621847 (diff)
fix double free (closes: #711045)
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/contrib/fileutl.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc
index f18e17005..46661887a 100644
--- a/apt-pkg/contrib/fileutl.cc
+++ b/apt-pkg/contrib/fileutl.cc
@@ -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);