]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/librados/snapshots.cc: fix resource leak, delete op
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Fri, 2 Jan 2015 18:27:17 +0000 (19:27 +0100)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 7 Jan 2015 09:14:12 +0000 (10:14 +0100)
Fix for:

CID 1260395 (#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 <danny.al-gaaf@bisect.de>
src/test/librados/snapshots.cc

index 2431495eee9543e60b31f27cab41b6758bbbde25..880b84dac359784e060d1b7a9bdc2569920061ba 100644 (file)
@@ -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) {