Skip to content

Commit

Permalink
test/librados/snapshots.cc: fix resource leak, delete op
Browse files Browse the repository at this point in the history
Fix for:

CID 1260395 (ceph#2 of 2): Resource leak (RESOURCE_LEAK)
 leaked_storage: Variable op going out of scope leaks the storage
 it points to.

Signed-off-by: Danny Al-Gaaf <[email protected]>
  • Loading branch information
dalgaaf committed Jan 7, 2015
1 parent 78542f9 commit 5ca4709
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/test/librados/snapshots.cc
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ TEST_F(LibRadosSnapshotsPP, SnapCreateRemovePP) {

EXPECT_EQ(0, ioctx.snap_remove("snapfoo"));
EXPECT_EQ(0, ioctx.snap_remove("snapbar"));

delete op;
}

TEST_F(LibRadosSnapshotsSelfManaged, Snap) {
Expand Down

0 comments on commit 5ca4709

Please sign in to comment.