diff options
author | Bala.FA <barumuga@redhat.com> | 2013-11-21 16:35:40 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2013-11-21 13:08:16 -0800 |
commit | d13bf457d489559fd8c011533b2201a113243d71 (patch) | |
tree | 944f4b997297b2ab98eaa34d9fa2535f9e567f96 /xlators/mgmt/glusterd/src/glusterd-utils.c | |
parent | 6157e4198c4ed5782936efd47f39e3e66463a9d2 (diff) |
cli: fix possible memory leaks
BUG: 955548
Change-Id: Iae410712e7e6d7a76cd537c77f1919e3b4cdf6bb
Signed-off-by: Bala.FA <barumuga@redhat.com>
Reviewed-on: http://review.gluster.org/6328
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-utils.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c index 5a74b720fc1..e093a566b09 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -4658,8 +4658,10 @@ glusterd_add_brick_to_dict (glusterd_volinfo_t *volinfo, memset (key, 0, sizeof (key)); snprintf (key, sizeof (key), "%s.peerid", base_key); ret = dict_set_dynstr (dict, key, peer_id_str); - if (ret) + if (ret) { + GF_FREE (peer_id_str); goto out; + } memset (key, 0, sizeof (key)); snprintf (key, sizeof (key), "%s.port", base_key); |