--- embedaddon/php/ext/fileinfo/libmagic/apptype.c 2012/02/21 23:47:56 1.1.1.1 +++ embedaddon/php/ext/fileinfo/libmagic/apptype.c 2012/05/29 12:34:39 1.1.1.2 @@ -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 @@ -72,6 +72,7 @@ file_os2_apptype(struct magic_set *ms, const char *fn, 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);