fix memory leak in mod_status when no counters are set (found by coverity)

From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2996 152afb58-edef-0310-8abb-c4023f1b3aa9
This commit is contained in:
Stefan Bühler 2015-07-05 21:34:07 +00:00
parent cfc88cf8f2
commit c31bf21f97
2 changed files with 3 additions and 1 deletions

1
NEWS
View File

@ -23,6 +23,7 @@ NEWS
* fix hex escape in accesslog (fixes #2559)
* show extforward re-run warning only with debug.log-request-handling (fixes #2561)
* parse If-None-Match for ETag validation (fixes #2578)
* fix memory leak in mod_status when no counters are set (found by coverity)
- 1.4.35 - 2014-03-12
* [network/ssl] fix build error if TLSEXT is disabled

View File

@ -622,7 +622,7 @@ static handler_t mod_status_handle_server_status_text(server *srv, connection *c
}
static handler_t mod_status_handle_server_statistics(server *srv, connection *con, void *p_d) {
buffer *b = buffer_init();
buffer *b;
size_t i;
array *st = srv->status;
UNUSED(p_d);
@ -635,6 +635,7 @@ static handler_t mod_status_handle_server_statistics(server *srv, connection *co
return HANDLER_FINISHED;
}
b = buffer_init();
for (i = 0; i < st->used; i++) {
size_t ndx = st->sorted[i];