]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test_cls_log.cc: fix resource leak, delete 'rop'
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Thu, 25 Jul 2013 22:44:26 +0000 (00:44 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Fri, 26 Jul 2013 21:55:53 +0000 (23:55 +0200)
Fixes for:

CID 1054838 (#14 of 14): Resource leak (RESOURCE_LEAK)
  leaked_storage: Variable "rop" going out of scope leaks the
  storage it points to.

CID 1054836 (#5 of 5): 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_log/test_cls_log.cc

index 090490d99a99762c40384ffd97f0f5cd35697c0e..ce97025f819c8567e0c4102a375baaa8392cb2f1 100644 (file)
@@ -279,7 +279,7 @@ TEST(cls_rgw, test_log_add_different_time)
   } while (truncated);
 
   ASSERT_EQ(10, i);
-
+  delete rop;
 }
 
 TEST(cls_rgw, test_log_trim)
@@ -330,4 +330,5 @@ TEST(cls_rgw, test_log_trim)
     ASSERT_EQ(9 - i, (int)entries.size());
     ASSERT_EQ(0, (int)truncated);
   }
+  delete rop;
 }