mirror of
https://github.com/ceph/ceph
synced 2025-03-11 02:39:05 +00:00
test: potential memory leak in FlushAioPP
Should call the release function instead of deleting it to free librbd::RBD::AioCompletion and librbd::AioCompletion. Otherwise there is a potential memory leak. Signed-off-by: Zhiqiang Wang <zhiqiang.wang@intel.com>
This commit is contained in:
parent
865b1e6f22
commit
ada7ec860c
@ -1962,12 +1962,12 @@ TEST_F(TestLibRBD, FlushAioPP)
|
||||
ASSERT_EQ(0, image.aio_flush(flush_comp));
|
||||
ASSERT_EQ(0, flush_comp->wait_for_complete());
|
||||
ASSERT_EQ(1, flush_comp->is_complete());
|
||||
delete flush_comp;
|
||||
flush_comp->release();
|
||||
|
||||
for (i = 0; i < num_aios; ++i) {
|
||||
librbd::RBD::AioCompletion *comp = write_comps[i];
|
||||
ASSERT_EQ(1, comp->is_complete());
|
||||
delete comp;
|
||||
comp->release();
|
||||
}
|
||||
ASSERT_PASSED(validate_object_map, image);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user