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

apt-pkg/deb/dpkgpm.cc

index 92f9662..3235b0b 100644 (file)
@@ -841,8 +841,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)