From: khizmax Date: Sat, 6 Aug 2016 07:09:24 +0000 (+0300) Subject: Fixed rare heap-use-after-free bug X-Git-Tag: v2.2.0~146 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ad0bad280c5d7cf82bbd10eb7e5b006cbefdb6de;p=libcds.git Fixed rare heap-use-after-free bug --- diff --git a/cds/intrusive/impl/feldman_hashset.h b/cds/intrusive/impl/feldman_hashset.h index bd731d7f..33828773 100644 --- a/cds/intrusive/impl/feldman_hashset.h +++ b/cds/intrusive/impl/feldman_hashset.h @@ -630,8 +630,7 @@ namespace cds { namespace intrusive { // slot value has been changed - retry stats().onSlotChanged(); } - - if ( slot.ptr()) { + else if ( slot.ptr()) { if ( cmp( hash, hash_accessor()( *slot.ptr())) == 0 ) { // the item with that hash value already exists stats().onInsertFailed();