From: Amos Jeffries Date: Fri, 9 Jan 2015 10:32:57 +0000 (-0800) Subject: cachemgr.cgi: memory leak in request parser X-Git-Tag: SQUID_3_4_11~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c824fdd6cfbe1613f47b32e542d10f105f50ab4f;p=thirdparty%2Fsquid.git cachemgr.cgi: memory leak in request parser Leaks a block of memory for each header parsed the size of the header. The CGI is rarely operating for long periods, it is run as-needed by servers so the memory leak does not accumulate long term. Detectd by Coverity Scan. Issue 1256164 --- diff --git a/tools/cachemgr.cc b/tools/cachemgr.cc index 63515a7f9a..d05dc63dce 100644 --- a/tools/cachemgr.cc +++ b/tools/cachemgr.cc @@ -1072,6 +1072,7 @@ read_request(void) req->workers = xstrdup(q); else if (0 == strcmp(t, "processes") && strlen(q)) req->processes = xstrdup(q); + safe_free(t); } if (req->server && !req->hostname) {