]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
clientReplyContext::setReplyToStoreEntry() must lock the entry
authorAlex Rousskov <rousskov@measurement-factory.com>
Fri, 24 Feb 2012 22:28:33 +0000 (15:28 -0700)
committerAlex Rousskov <rousskov@measurement-factory.com>
Fri, 24 Feb 2012 22:28:33 +0000 (15:28 -0700)
because clientReplyContext destructors always unlocks it via
removeClientStoreReference().

src/client_side_reply.cc

index f335ae251ec5171277ae4d75cf7b64153e71aa8b..f4021fea72698f7cece5297c139b2d1b281b0f28 100644 (file)
@@ -135,6 +135,7 @@ void clientReplyContext::setReplyToError(const HttpRequestMethod& method, ErrorS
 
 void clientReplyContext::setReplyToStoreEntry(StoreEntry *entry)
 {
+    entry->lock(); // removeClientStoreReference() unlocks
     sc = storeClientListAdd(entry, this);
 #if USE_DELAY_POOLS
     sc->setDelayId(DelayId::DelayClient(http));