From: Amos Jeffries Date: Thu, 8 Jan 2015 23:06:40 +0000 (-0800) Subject: cachemgr.cgi: memory leak in request parser X-Git-Tag: merge-candidate-3-v1~362 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e9073d78e2661d14f909f839e69c33cc486d44ec;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 fbbd433bfa..6a2aee6387 100644 --- a/tools/cachemgr.cc +++ b/tools/cachemgr.cc @@ -1035,6 +1035,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) {