From: hno <> Date: Sat, 25 Sep 2004 04:22:49 +0000 (+0000) Subject: Bug #1009: Squid is falling periodically with segmentation failed when X-Git-Tag: SQUID_3_0_PRE4~1053 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c540a3038232f40d7549e05a26291ea280a792fb;p=thirdparty%2Fsquid.git Bug #1009: Squid is falling periodically with segmentation failed when using heap policies --- diff --git a/src/repl/heap/store_repl_heap.cc b/src/repl/heap/store_repl_heap.cc index 8af580b0f7..e486e492cf 100644 --- a/src/repl/heap/store_repl_heap.cc +++ b/src/repl/heap/store_repl_heap.cc @@ -1,6 +1,6 @@ /* - * $Id: store_repl_heap.cc,v 1.14 2003/09/06 12:47:36 robertc Exp $ + * $Id: store_repl_heap.cc,v 1.15 2004/09/24 22:22:49 hno Exp $ * * DEBUG: section ? HEAP based removal policies * AUTHOR: Henrik Nordstrom @@ -232,6 +232,7 @@ try_again: entry = (StoreEntry *)heap_extractmin(heap->theHeap); if (storeEntryLocked(entry)) { + storeLockObject(entry); linklistPush(&heap_walker->locked_entries, entry); goto try_again; } @@ -264,6 +265,7 @@ heap_purgeDone(RemovalPurgeWalker * walker) while ((entry = (StoreEntry *)linklistShift(&heap_walker->locked_entries))) { heap_node *node = heap_insert(heap->theHeap, entry); heap->setPolicyNode(entry, node); + storeUnlockObject(entry); } safe_free(walker->_data);