From: Amos Jeffries Date: Mon, 19 Jan 2015 14:22:29 +0000 (-0800) Subject: Bug 3920: Splay::remove() reference counting inconsistent X-Git-Tag: merge-candidate-3-v1~329 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b7cfa5b30018bf8a815d838408289a49f8340546;p=thirdparty%2Fsquid.git Bug 3920: Splay::remove() reference counting inconsistent --- diff --git a/include/splay.h b/include/splay.h index 69d6939110..270bcb6e36 100644 --- a/include/splay.h +++ b/include/splay.h @@ -313,7 +313,9 @@ template void Splay::remove(Value const &value, SPLAYCMP *compare) { - assert (find (value, compare)); + // also catches the head==NULL case + if (find(value, compare) == NULL) + return; head = head->remove(value, compare);