]> granicus.if.org Git - file/commitdiff
avoid descriptor leak in compress code. Daniel Novotny <dnovotny@redhat.com>
authorChristos Zoulas <christos@zoulas.com>
Mon, 23 Mar 2009 14:21:51 +0000 (14:21 +0000)
committerChristos Zoulas <christos@zoulas.com>
Mon, 23 Mar 2009 14:21:51 +0000 (14:21 +0000)
src/compress.c

index 99855bac8ca73e4b3fccf009663340d299437b49..28dacd338cec019ac38ce3cffc4aace694e5f4a0 100644 (file)
@@ -35,7 +35,7 @@
 #include "file.h"
 
 #ifndef lint
-FILE_RCSID("@(#)$File: compress.c,v 1.62 2009/03/05 22:40:28 christos Exp $")
+FILE_RCSID("@(#)$File: compress.c,v 1.63 2009/03/23 14:21:51 christos Exp $")
 #endif
 
 #include "magic.h"
@@ -487,6 +487,8 @@ err:
 #else
                (void)wait(NULL);
 #endif
+               (void) close(fdin[0]);
+           
                return n;
        }
 }