From e49f034a22dcfc2cd4ed9c43bc7340e158cd9e12 Mon Sep 17 00:00:00 2001 From: Christos Zoulas Date: Sun, 28 Aug 2011 07:03:27 +0000 Subject: [PATCH] fix resource leak: Thomas Jarosch thomas dot jarosch at intra2net dot com --- src/apptype.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- 2.40.0