From: Christos Zoulas Date: Mon, 23 Mar 2009 14:21:51 +0000 (+0000) Subject: avoid descriptor leak in compress code. Daniel Novotny X-Git-Tag: FILE5_05~218 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7b59ba5820b9ed0a461b6ef28cdb756f4f6a10c9;p=file avoid descriptor leak in compress code. Daniel Novotny --- diff --git a/src/compress.c b/src/compress.c index 99855bac..28dacd33 100644 --- a/src/compress.c +++ b/src/compress.c @@ -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; } }