]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test_cls_version.cc: fix another ressource leak
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Mon, 22 Jul 2013 09:27:14 +0000 (11:27 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Mon, 22 Jul 2013 10:58:28 +0000 (12:58 +0200)
CID 1049219 (#17 of 17): 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/cls_version/test_cls_version.cc

index 49c64b0b829c398a384ea7dd70301b3d1affaceb..5fc3c23e32abbc08f1169b6419b384e36d7a5893 100644 (file)
@@ -283,6 +283,8 @@ TEST(cls_rgw, test_version_inc_check)
   ASSERT_GT((long long)ver2.ver, (long long)ver.ver);
   ASSERT_EQ(0, (int)ver2.tag.compare(ver.tag));
 
+  delete op;
+
   /* a bunch of conditions that should fail */
   rop = new_rop();
   cls_version_check(*rop, ver, VER_COND_LT);