mirror of
https://github.com/ceph/ceph
synced 2024-12-17 17:05:42 +00:00
test_cls_version.cc: fix resource leak, delete before new()
CID 1049217 (#1 of 1): Resource leak (RESOURCE_LEAK) overwrite_var: Overwriting "op" in "op = new_op()" leaks the storage that "op" points to. Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
This commit is contained in:
parent
d3782d80d5
commit
3e94393000
@ -55,6 +55,7 @@ TEST(cls_rgw, test_version_inc_read)
|
||||
ASSERT_NE(0, (int)ver.tag.size());
|
||||
|
||||
/* inc version again! */
|
||||
delete op;
|
||||
op = new_op();
|
||||
cls_version_inc(*op);
|
||||
ASSERT_EQ(0, ioctx.operate(oid, op));
|
||||
|
Loading…
Reference in New Issue
Block a user