summaryrefslogtreecommitdiff
path: root/apptype.c
diff options
context:
space:
mode:
Diffstat (limited to 'apptype.c')
-rw-r--r--apptype.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/apptype.c b/apptype.c
index 31b8095e13ba..fcd764e49a44 100644
--- a/apptype.c
+++ b/apptype.c
@@ -27,7 +27,7 @@
#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: apptype.c,v 1.11 2009/02/04 18:24:32 christos Exp $")
+FILE_RCSID("@(#)$File: apptype.c,v 1.13 2011/09/07 21:57:15 christos Exp $")
#endif /* lint */
#include <stdlib.h>
@@ -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)fclose(fp);
return -1;
}
(void)fclose(fp);