X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/8da1f029b7544202da68100b22a2901809bf07af..608c766dc110493b952a615c3eb82c3cf3ed8b90:/apt-pkg/deb/dpkgpm.cc 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;