summaryrefslogtreecommitdiff
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
parent8432058667daea6a0c1c26febe6472eed917593a (diff)
* apt-pkg/deb/dpkgpm.cc:
- fix resource leak (LP: #148806)
-rw-r--r--apt-pkg/deb/dpkgpm.cc5
-rw-r--r--debian/changelog2
2 files changed, 6 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)
diff --git a/debian/changelog b/debian/changelog
index 066234451..ddcc6895d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,7 @@
apt (0.7.6ubuntu14) gutsy; urgency=low
+ * apt-pkg/deb/dpkgpm.cc:
+ - fix resource leak (LP: #148806)
* debian/apt.cron.daily:
- only run the cron job if apt-get check succeeds (LP: #131719)