diff --git a/NEWS b/NEWS index a8a54eb7..d6520749 100644 --- a/NEWS +++ b/NEWS @@ -16,6 +16,7 @@ NEWS * [core] decode URL before rewrite, enabling it to work in $HTTP["url"] conditionals (fixes #2526) * [auto* build] remove -no-undefined from linker flags, as we actually link modules with undefined symbols (fixes #2533) * [mod_mysql_vhost] fix memory leak on config init (#2530) + * [mod_webdav] fix fd leak found with parfait (fixes #2530, thx kukackajiri) - 1.4.33 - 2013-09-27 * mod_fastcgi: fix mix up of "mode" => "authorizer" in other fastcgi configs (fixes #2465, thx peex) diff --git a/src/mod_webdav.c b/src/mod_webdav.c index 7f85ce5d..5b335142 100644 --- a/src/mod_webdav.c +++ b/src/mod_webdav.c @@ -1717,7 +1717,7 @@ URIHANDLER_FUNC(mod_webdav_subrequest_handler) { if (-1 == c->file.fd && /* open the file if not already open */ -1 == (c->file.fd = open(c->file.name->ptr, O_RDONLY))) { log_error_write(srv, __FILE__, __LINE__, "ss", "open failed: ", strerror(errno)); - + close(fd); return HANDLER_ERROR; } @@ -1726,7 +1726,7 @@ URIHANDLER_FUNC(mod_webdav_subrequest_handler) { strerror(errno), c->file.name, c->file.fd); close(c->file.fd); c->file.fd = -1; - + close(fd); return HANDLER_ERROR; }