summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)