From: Christos Zoulas Date: Wed, 14 Mar 2001 14:35:29 +0000 (+0000) Subject: avoid closing the file twice [harmless] X-Git-Tag: FILE3_35~17 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6f234beb9a2c64613e280a76973ddd493d1141fe;p=file avoid closing the file twice [harmless] --- diff --git a/src/apprentice.c b/src/apprentice.c index dc06ccec..8b45e2fb 100644 --- a/src/apprentice.c +++ b/src/apprentice.c @@ -38,7 +38,7 @@ #include "file.h" #ifndef lint -FILE_RCSID("@(#)$Id: apprentice.c,v 1.36 2001/03/14 14:33:56 christos Exp $") +FILE_RCSID("@(#)$Id: apprentice.c,v 1.37 2001/03/14 14:35:29 christos Exp $") #endif /* lint */ #define EATAB {while (isascii((unsigned char) *l) && \ @@ -810,6 +810,7 @@ apprentice_map(magicp, nmagicp, fn, action) goto error; } (void)close(fd); + fd = -1; ptr = (uint32 *) *magicp; if (*ptr != MAGICNO) { if (swap4(*ptr) != MAGICNO) {