From: Danny Al-Gaaf Date: Thu, 9 Oct 2014 13:29:45 +0000 (+0200) Subject: test/librados/c_write_operations.cc: free ressources X-Git-Tag: v0.88~83^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c60a17075db8a90a65dda1f1a26c035c1ffc73b9;p=ceph.git test/librados/c_write_operations.cc: free ressources 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 --- diff --git a/src/test/librados/c_write_operations.cc b/src/test/librados/c_write_operations.cc index 4dede36a3679..4202b594289d 100644 --- a/src/test/librados/c_write_operations.cc +++ b/src/test/librados/c_write_operations.cc @@ -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);