From: Michael Vogt Date: Mon, 15 Oct 2007 19:08:06 +0000 (+0200) Subject: * apt-pkg/deb/dpkgpm.cc: X-Git-Tag: 0.7.24ubuntu1~125 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/c771f6d9c30f94e37050af49e887f20767822dbb * apt-pkg/deb/dpkgpm.cc: - fix resource leak (LP: #148806) --- 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)