]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test_cls_version.cc: fix ressource leak
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Mon, 22 Jul 2013 09:23:57 +0000 (11:23 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Mon, 22 Jul 2013 10:58:28 +0000 (12:58 +0200)
CID 1049220 (#18 of 18): Resource leak (RESOURCE_LEAK)
  leaked_storage: Variable "rop" going out of scope leaks
  the storage it points to.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/test/cls_version/test_cls_version.cc

index caa0a36cd74a74eca9dfa9fc48f6c60a3aba99a4..49c64b0b829c398a384ea7dd70301b3d1affaceb 100644 (file)
@@ -295,4 +295,6 @@ TEST(cls_rgw, test_version_inc_check)
   rop = new_rop();
   cls_version_check(*rop, cond_ver, VER_COND_TAG_NE);
   ASSERT_EQ(-ECANCELED, ioctx.operate(oid, rop, &bl));
+
+  delete rop;
 }