]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
libcephfs/test.cc: shutdown cmount at end of MountNonExist
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Thu, 13 Mar 2014 10:21:42 +0000 (11:21 +0100)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Thu, 13 Mar 2014 10:21:42 +0000 (11:21 +0100)
CID 966624 (#5 of 5): Resource leak (RESOURCE_LEAK)
 17. 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 c3b399f1f06f666bdf393455d2e0506dc60895fc..9d917f510384c0b746e986a331a44212f7035fec 100644 (file)
@@ -69,6 +69,7 @@ TEST(LibCephFS, MountNonExist) {
   ASSERT_EQ(0, ceph_conf_parse_env(cmount, NULL));
   ASSERT_EQ(0, ceph_conf_read_file(cmount, NULL));
   ASSERT_NE(0, ceph_mount(cmount, "/non-exist"));
+  ceph_shutdown(cmount);
 }
 
 TEST(LibCephFS, MountDouble) {