diff options
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-utils.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c index 5bfa809b053..e89ed1102fe 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -865,6 +865,8 @@ glusterd_brickinfo_delete (glusterd_brickinfo_t *brickinfo) cds_list_del_init (&brickinfo->brick_list); + (void) gf_store_handle_destroy (brickinfo->shandle); + GF_FREE (brickinfo->logfile); GF_FREE (brickinfo); @@ -926,6 +928,9 @@ glusterd_volinfo_delete (glusterd_volinfo_t *volinfo) dict_unref (volinfo->rebal.dict); gf_store_handle_destroy (volinfo->quota_conf_shandle); + gf_store_handle_destroy (volinfo->shandle); + gf_store_handle_destroy (volinfo->node_state_shandle); + gf_store_handle_destroy (volinfo->snapd.handle); glusterd_auth_cleanup (volinfo); @@ -1054,6 +1059,9 @@ glusterd_get_brick_mount_dir (char *brickpath, char *hostname, char *mount_dir) } out: + if (mnt_pt) + GF_FREE(mnt_pt); + gf_msg_trace (this->name, 0, "Returning %d", ret); return ret; } @@ -5601,7 +5609,8 @@ glusterd_add_brick_mount_details (glusterd_brickinfo_t *brickinfo, ret = dict_set_dynstr_with_alloc (dict, key, entry->mnt_opts); out: - GF_FREE (mnt_pt); + if (mnt_pt) + GF_FREE (mnt_pt); return ret; } @@ -5644,6 +5653,9 @@ glusterd_get_brick_mount_device (char *brick_path) device = gf_strdup (entry->mnt_fsname); out: + if (mnt_pt) + GF_FREE(mnt_pt); + return device; } @@ -10848,7 +10860,8 @@ glusterd_update_mntopts (char *brick_path, glusterd_brickinfo_t *brickinfo) ret = 0; out: - GF_FREE (mnt_pt); + if (mnt_pt) + GF_FREE (mnt_pt); return ret; } |