From: Christos Zoulas Date: Sun, 28 Aug 2011 07:03:27 +0000 (+0000) Subject: fix resource leak: Thomas Jarosch thomas dot jarosch at intra2net dot com X-Git-Tag: FILE5_09~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e49f034a22dcfc2cd4ed9c43bc7340e158cd9e12;p=file fix resource leak: Thomas Jarosch thomas dot jarosch at intra2net dot com --- diff --git a/src/apptype.c b/src/apptype.c index 84c0133b..128155a2 100644 --- a/src/apptype.c +++ b/src/apptype.c @@ -27,7 +27,7 @@ #include "file.h" #ifndef lint -FILE_RCSID("@(#)$File: apptype.c,v 1.10 2009/02/03 20:27:51 christos Exp $") +FILE_RCSID("@(#)$File: apptype.c,v 1.11 2009/02/04 18:24:32 christos Exp $") #endif /* lint */ #include @@ -72,6 +72,7 @@ file_os2_apptype(struct magic_set *ms, const char *fn, const void *buf, if (fwrite(buf, 1, nb, fp) != nb) { file_error(ms, errno, "cannot write tmp file `%s'", path); + (void)fclse(fp); return -1; } (void)fclose(fp);