diff options
-rw-r--r-- | apt-pkg/deb/dpkgpm.cc | 6 | ||||
-rw-r--r-- | apt-pkg/init.cc | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index aa840f85e..94215197c 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -843,12 +843,14 @@ bool pkgDPkgPM::Go(int OutStatusFd) if(stopOnError) { - fclose(term_out); + if(term_out) + fclose(term_out); return false; } } } - fclose(term_out); + if(term_out) + fclose(term_out); if (RunScripts("DPkg::Post-Invoke") == false) return false; diff --git a/apt-pkg/init.cc b/apt-pkg/init.cc index 2617603ec..cc3c1f01c 100644 --- a/apt-pkg/init.cc +++ b/apt-pkg/init.cc @@ -77,7 +77,7 @@ bool pkgInitConfig(Configuration &Cnf) // State Cnf.Set("Dir::Log","var/log/apt"); - Cnf.Set("Dir::Log::Name","term.log"); + Cnf.Set("Dir::Log::Terminal","term.log"); bool Res = true; |