mirror of
https://github.com/ceph/ceph
synced 2025-02-19 00:47:49 +00:00
Merge pull request #3106 from danderson/asan-fixes
Asan fixes Reviewed-by: Loic Dachary <ldachary@redhat.com>
This commit is contained in:
commit
bc2b9f6bf5
@ -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_);
|
||||
|
@ -328,7 +328,7 @@ static simple_spinlock_t buffer_debug_lock = SIMPLE_SPINLOCK_INITIALIZER;
|
||||
|
||||
~raw_pipe() {
|
||||
if (data)
|
||||
delete data;
|
||||
free(data);
|
||||
close_pipe(pipefds);
|
||||
dec_total_alloc(len);
|
||||
bdout << "raw_pipe " << this << " free " << (void *)data << " "
|
||||
|
@ -83,7 +83,7 @@ TEST(chain_xattr, get_and_set) {
|
||||
const string x(LARGE_BLOCK_LEN, 'X');
|
||||
|
||||
{
|
||||
char y[CHAIN_XATTR_MAX_NAME_LEN];
|
||||
char y[CHAIN_XATTR_MAX_BLOCK_LEN];
|
||||
ASSERT_EQ(LARGE_BLOCK_LEN, chain_setxattr(file, name.c_str(), x.c_str(), LARGE_BLOCK_LEN));
|
||||
ASSERT_EQ(CHAIN_XATTR_MAX_BLOCK_LEN, chain_setxattr(file, name.c_str(), x.c_str(), CHAIN_XATTR_MAX_BLOCK_LEN));
|
||||
ASSERT_EQ(CHAIN_XATTR_MAX_BLOCK_LEN, chain_getxattr(file, name.c_str(), 0, 0));
|
||||
|
Loading…
Reference in New Issue
Block a user