]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/librados/c_write_operations.cc: free ressources
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Thu, 9 Oct 2014 13:29:45 +0000 (15:29 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Thu, 9 Oct 2014 13:31:52 +0000 (15:31 +0200)
Release completion as soon as no longer needed.

Fix for:

CID 1219593 (#1 of 1): Resource leak (RESOURCE_LEAK)
 leaked_storage: Variable completion going out of scope
 leaks the storage it points to.

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

index 4dede36a36792e7e7f3b1c65a68b48e77df70218..4202b594289deab6d92cffc1b2e8a0cd06315fd6 100644 (file)
@@ -34,6 +34,7 @@ TEST(LibRadosCWriteOps, assertExists) {
   ASSERT_EQ(0, rados_aio_write_op_operate(op2, ioctx, completion, "test", NULL, 0));
   rados_aio_wait_for_complete(completion);
   ASSERT_EQ(-2, rados_aio_get_return_value(completion));
+  rados_aio_release(completion);
 
   rados_ioctx_destroy(ioctx);
   rados_release_write_op(op2);