summaryrefslogtreecommitdiff
path: root/apt-pkg/deb/dpkgpm.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2007-10-15 21:23:04 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2007-10-15 21:23:04 +0200
commit477b5d6cacb53e868ec182330ffdcc3678a98560 (patch)
tree8a6ffb7bb9f36df84857c7171dc18340c502209f /apt-pkg/deb/dpkgpm.cc
parente15dcd38afd712c1c935339e533c72cd8f0f70bb (diff)
apt-pkg/deb/dpkgpm.cc:
- fix resource leak
Diffstat (limited to 'apt-pkg/deb/dpkgpm.cc')
-rw-r--r--apt-pkg/deb/dpkgpm.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
index 92f96620f..3235b0b06 100644
--- a/apt-pkg/deb/dpkgpm.cc
+++ b/apt-pkg/deb/dpkgpm.cc
@@ -841,8 +841,11 @@ bool pkgDPkgPM::Go(int OutStatusFd)
signal(SIGQUIT,old_SIGQUIT);
signal(SIGINT,old_SIGINT);
- if(master >= 0 && slave >= 0)
+ if(master >= 0)
+ {
tcsetattr(0, TCSAFLUSH, &tt);
+ close(master);
+ }
// Check for an error code.
if (WIFEXITED(Status) == 0 || WEXITSTATUS(Status) != 0)