------------------------------------------------------------ revno: 13718 revision-id: squid3@treenet.co.nz-20150109060734-enmch1byp8vezjrf parent: squid3@treenet.co.nz-20150109060247-kffknohkkat0rij8 committer: Amos Jeffries branch nick: 3.5 timestamp: Thu 2015-01-08 22:07:34 -0800 message: 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 ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20150109060734-enmch1byp8vezjrf # target_branch: http://bzr.squid-cache.org/bzr/squid3/3.5 # testament_sha1: e41a376f912508f3f45f0473049b0fdd438076b6 # timestamp: 2015-01-09 06:08:46 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/3.5 # base_revision_id: squid3@treenet.co.nz-20150109060247-\ # kffknohkkat0rij8 # # Begin patch === modified file 'tools/cachemgr.cc' --- tools/cachemgr.cc 2014-12-20 18:14:00 +0000 +++ tools/cachemgr.cc 2015-01-09 06:07:34 +0000 @@ -1035,6 +1035,7 @@ req->workers = xstrdup(q); else if (0 == strcmp(t, "processes") && strlen(q)) req->processes = xstrdup(q); + safe_free(t); } if (req->server && !req->hostname) {