]> granicus.if.org Git - file/commitdiff
avoid closing the file twice [harmless]
authorChristos Zoulas <christos@zoulas.com>
Wed, 14 Mar 2001 14:35:29 +0000 (14:35 +0000)
committerChristos Zoulas <christos@zoulas.com>
Wed, 14 Mar 2001 14:35:29 +0000 (14:35 +0000)
src/apprentice.c

index dc06ccecda8416d3dc072fa75637f7c4113c8062..8b45e2fb0ca4a0b9518232ec044001fd425284e4 100644 (file)
@@ -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) {