diff options
author | David Kalnischkies <kalnischkies@gmail.com> | 2010-04-03 17:57:41 +0200 |
---|---|---|
committer | David Kalnischkies <kalnischkies@gmail.com> | 2010-04-03 17:57:41 +0200 |
commit | 5e8b2b74ab565ffb72e035ce89a7a991d4de3dcf (patch) | |
tree | a1c70dc832b3b3e5dc2ad85cb250481ae8e1f968 /apt-pkg/deb | |
parent | c753eec1d192a56e7f4ba1b07ae766b740185a3f (diff) | |
download | apt-5e8b2b74ab565ffb72e035ce89a7a991d4de3dcf.tar.gz |
Initialize history_out always with NULL so apt will not segfault later
in the event of a failure in OpenLog() (which will happen if called with
Debug::NoLocking as user)
Diffstat (limited to 'apt-pkg/deb')
-rw-r--r-- | apt-pkg/deb/dpkgpm.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index c0efa7b5..14a4968f 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -105,7 +105,7 @@ ionice(int PID) /* */ pkgDPkgPM::pkgDPkgPM(pkgDepCache *Cache) : pkgPackageManager(Cache), dpkgbuf_pos(0), - term_out(NULL), PackagesDone(0), PackagesTotal(0) + term_out(NULL), history_out(NULL), PackagesDone(0), PackagesTotal(0) { } /*}}}*/ @@ -651,6 +651,7 @@ bool pkgDPkgPM::CloseLog() fprintf(history_out, "End-Date: %s\n", timestr); fclose(history_out); } + history_out = NULL; return true; } |