summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2007-10-15 21:08:06 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2007-10-15 21:08:06 +0200
commitc771f6d9c30f94e37050af49e887f20767822dbb (patch)
tree956ae6b3f87c719ceec967dc4660883dfd71b6cb /apt-pkg
parent8432058667daea6a0c1c26febe6472eed917593a (diff)
* apt-pkg/deb/dpkgpm.cc:
- fix resource leak (LP: #148806)
Diffstat (limited to 'apt-pkg')
-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 466d3628b..ff0a3c443 100644
--- a/apt-pkg/deb/dpkgpm.cc
+++ b/apt-pkg/deb/dpkgpm.cc
@@ -867,8 +867,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)