]> 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)
committerSquid Anubis <squid-anubis@squid-cache.org>
Sat, 29 Jun 2019 10:42:30 +0000 (10:42 +0000)
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 7bb6190f7f450f953649e781415f58f06b27ac21..a0ee371b815f82ea400805e96f67be9753d7ddbc 100644 (file)
@@ -312,6 +312,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);