Fix alloc-dealloc mismatch reported by ASan (new[] vs. delete).

Signed-off-by: David Anderson <dave@natulte.net>
This commit is contained in:
David Anderson 2014-12-07 12:02:48 -08:00
parent 5bb86664b8
commit f6f6ea2982

View File

@ -34,7 +34,7 @@ void bloom_filter::decode(bufferlist::iterator& p)
salt_.clear();
generate_unique_salt();
table_size_ = t.length();
delete bit_table_;
delete[] bit_table_;
if (table_size_) {
bit_table_ = new cell_type[table_size_];
t.copy(0, table_size_, (char *)bit_table_);