* apt-pkg/deb/dpkgpm.cc:
authorMichael Vogt <michael.vogt@ubuntu.com>
Mon, 15 Oct 2007 19:08:06 +0000 (21:08 +0200)
committerMichael Vogt <michael.vogt@ubuntu.com>
Mon, 15 Oct 2007 19:08:06 +0000 (21:08 +0200)
  - fix resource leak (LP: #148806)

apt-pkg/deb/dpkgpm.cc
debian/changelog

index 466d362..ff0a3c4 100644 (file)
@@ -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)
index 0662344..ddcc689 100644 (file)
@@ -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)