From: khizmax Date: Tue, 15 Sep 2015 21:09:38 +0000 (+0300) Subject: Fixed a bug in update() function X-Git-Tag: v2.1.0~106 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=2dfd67cfd8d7f3589877570d1810ad6865d31252;p=libcds.git Fixed a bug in update() function --- diff --git a/cds/container/lazy_kvlist_nogc.h b/cds/container/lazy_kvlist_nogc.h index 4399ee5f..1cf0729a 100644 --- a/cds/container/lazy_kvlist_nogc.h +++ b/cds/container/lazy_kvlist_nogc.h @@ -546,10 +546,10 @@ namespace cds { namespace container { std::pair ret = base_class::update_at( &refHead, *pNode, [&pItemFound](bool, node_type& item, node_type&){ pItemFound = &item; }, bAllowInsert ); - if ( ret.first && ret.second ) + + if ( ret.second ) pNode.release(); - assert( pItemFound != nullptr ); return std::make_pair( pItemFound, ret.second ); }