-fclose file, even if fileno failed...

This commit is contained in:
Christian Grothoff
2016-01-18 21:39:09 +00:00
parent d22012f34d
commit d9da87668f
+4 -1
View File
@@ -143,7 +143,10 @@ http_ahc (void *cls,
{
fd = fileno (file);
if (-1 == fd)
return MHD_NO; /* internal error */
{
(void) fclose (file);
return MHD_NO; /* internal error */
}
if ( (0 != fstat (fd, &buf)) ||
(! S_ISREG (buf.st_mode)) )
{