From: Amos Jeffries Date: Wed, 7 Jan 2015 10:00:25 +0000 (-0800) Subject: Fix assertions inserting duplicate values into a splay X-Git-Tag: merge-candidate-3-v1~367 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8456681e68bc245c58ea7679cee004181e0fc94d;p=thirdparty%2Fsquid.git Fix assertions inserting duplicate values into a splay ... loading ACLs with duplicate values is quite common. --- diff --git a/include/splay.h b/include/splay.h index acf42709ea..bc2a3d30b9 100644 --- a/include/splay.h +++ b/include/splay.h @@ -299,7 +299,9 @@ template void Splay::insert(Value const &value, SPLAYCMP *compare) { - assert (find (value, compare) == NULL); + if (find(value, compare) != NULL) // ignore duplicates + return; + if (head == NULL) head = new SplayNode(value); else