]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
libcephfs/test.cc: shutdown cmount
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Thu, 13 Mar 2014 08:48:44 +0000 (09:48 +0100)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Thu, 13 Mar 2014 08:48:44 +0000 (09:48 +0100)
CID 743410 (#17 of 17): Resource leak (RESOURCE_LEAK)
 65. leaked_storage: Variable "cmount" going out of scope leaks the storage
 it points to.

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

index b42a8e85419b2faa4aeac71e3b3912992abe664b..c3b399f1f06f666bdf393455d2e0506dc60895fc 100644 (file)
@@ -848,6 +848,8 @@ TEST(LibCephFS, BadFileDesc) {
   ASSERT_EQ(ceph_get_file_stripe_unit(cmount, -1), -EBADF);
   ASSERT_EQ(ceph_get_file_pool(cmount, -1), -EBADF);
   ASSERT_EQ(ceph_get_file_replication(cmount, -1), -EBADF);
+
+  ceph_shutdown(cmount);
 }
 
 TEST(LibCephFS, ReadEmptyFile) {