]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/librados/aio.cc: release completion before exit
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Fri, 14 Nov 2014 18:58:43 +0000 (19:58 +0100)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 7 Jan 2015 09:14:11 +0000 (10:14 +0100)
CID 1242020 (#1 of 1): Resource leak (RESOURCE_LEAK)
 leaked_storage: Variable my_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/aio.cc

index eb86afcba64fffb3fbd452ff5d75936a1a12a4b4..34f740ddb5e9a842249d8575bf527e761a635ae0 100644 (file)
@@ -175,6 +175,7 @@ TEST(LibRadosAio, TooBig) {
                                          my_completion, buf, UINT_MAX));
   ASSERT_EQ(-E2BIG, rados_aio_append(test_data.m_ioctx, "foo",
                                      my_completion, buf, UINT_MAX));
+  rados_aio_release(my_completion);
 }
 
 TEST(LibRadosAio, TooBigPP) {