diff options
author | Michal Jarzabek <stiopa@gmail.com> | 2016-12-18 17:16:12 +0100 |
---|---|---|
committer | Michal Jarzabek <stiopa@gmail.com> | 2016-12-18 17:16:12 +0100 |
commit | a567fa66f872c7dd6ef0573d1070ffb13d67b09e (patch) | |
tree | 6aaa595ff2df30c3829707fa865e50370f1664e6 /src/libcephfs.cc | |
parent | Merge pull request #12458 from Liuchang0812/add-more-log-for-network-error (diff) | |
download | ceph-a567fa66f872c7dd6ef0573d1070ffb13d67b09e.tar.xz ceph-a567fa66f872c7dd6ef0573d1070ffb13d67b09e.zip |
libcephfs.cc: fix memory leak
Signed-off-by: Michal Jarzabek <stiopa@gmail.com>
Diffstat (limited to 'src/libcephfs.cc')
-rw-r--r-- | src/libcephfs.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libcephfs.cc b/src/libcephfs.cc index 5199855797d..2c1ada54438 100644 --- a/src/libcephfs.cc +++ b/src/libcephfs.cc @@ -334,7 +334,9 @@ extern "C" int ceph_create(struct ceph_mount_info **cmount, const char * const i CephContext *cct = common_preinit(iparams, CODE_ENVIRONMENT_LIBRARY, 0); cct->_conf->parse_env(); // environment variables coverride cct->_conf->apply_changes(NULL); - return ceph_create_with_context(cmount, cct); + int ret = ceph_create_with_context(cmount, cct); + cct->put(); + return ret; } extern "C" int ceph_unmount(struct ceph_mount_info *cmount) |