[squid-dev] HttpHeader::delById leaks
Alex Rousskov
rousskov at measurement-factory.com
Wed May 4 16:58:47 UTC 2016
Hello,
AFAICT, the following trunk code leaks every "deleted" header field:
> HttpHeader::delById(Http::HdrType id)
> {
...
> //replace matching items with nil and count them
> std::replace_if(entries.begin(), entries.end(),
> [&](const HttpHeaderEntry *e) {
> if (e && e->id == id) {
> ++count;
> return true;
> }
> return false;
> },
> nullptr);
The leak was created in trunk r14285 dated 2015-09-05: Refactor
HttpHeader into gperf-generated perfect hash.
> $ bzr grep delById | wc -l
> 39
Please fix if you can.
Thank you,
Alex.
More information about the squid-dev
mailing list