]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 4842: Memory leak when http_reply_access uses external_acl (#424)
authorChristos Tsantilas <christos@chtsanti.net>
Sat, 29 Jun 2019 07:15:34 +0000 (07:15 +0000)
committerAmos Jeffries <yadij@users.noreply.github.com>
Thu, 4 Jul 2019 11:01:16 +0000 (23:01 +1200)
Http::One::Server::handleReply() sets AccessLogEntry::reply which may
already be set. It is already set, for example, when the ACL code
has already called syncAle() because external ACLs require an ALE.

This bug was introduced by commit fbbea6620.

This is a Measurement Factory project.

src/servers/Http1Server.cc

index 59db6f1e47a70536925fc886816185410c0b3fa2..73b406d069d31bff0a6001af03c7c1bdb7d99c87 100644 (file)
@@ -305,6 +305,7 @@ Http::One::Server::handleReply(HttpReply *rep, StoreIOBuffer receivedData)
     }
 
     assert(rep);
+    HTTPMSGUNLOCK(http->al->reply);
     http->al->reply = rep;
     HTTPMSGLOCK(http->al->reply);
     context->sendStartOfMessage(rep, receivedData);