]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
libcephfs: destroy cmount on ceph_shutdown()
authorSage Weil <sage@inktank.com>
Tue, 2 Oct 2012 04:08:27 +0000 (21:08 -0700)
committerSage Weil <sage@inktank.com>
Tue, 2 Oct 2012 04:08:27 +0000 (21:08 -0700)
Otherwise this chunk of the heap is leaked.

Signed-off-by: Sage Weil <sage@inktank.com>
src/libcephfs.cc

index 0400a2b0e3dbd016f143c45970ea300a5862824f..3c9feb0f67a94c035624b8d84cce0d98b9efba8f 100644 (file)
@@ -233,6 +233,7 @@ extern "C" int ceph_create(struct ceph_mount_info **cmount, const char * const i
 extern "C" void ceph_shutdown(struct ceph_mount_info *cmount)
 {
   cmount->shutdown();
+  delete cmount;
 }
 
 extern "C" int ceph_conf_read_file(struct ceph_mount_info *cmount, const char *path)