summaryrefslogtreecommitdiff
path: root/apt-pkg/deb
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/deb')
-rw-r--r--apt-pkg/deb/dpkgpm.cc6
1 files changed, 4 insertions, 2 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;