commit d9da87668f04dba7c164f2dab044a5858933b741 parent d22012f34da6e518ab178f9ee7c4a0f53c3d08d6 Author: Christian Grothoff <christian@grothoff.org> Date: Mon, 18 Jan 2016 21:39:09 +0000 -fclose file, even if fileno failed... Diffstat:
| M | src/examples/https_fileserver_example.c | | | 5 | ++++- |
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/examples/https_fileserver_example.c b/src/examples/https_fileserver_example.c @@ -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)) ) {