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>
This commit is contained in:
parent
6157e4198c
commit
d13bf457d4
@ -3268,6 +3268,9 @@ glusterd_op_modify_op_ctx (glusterd_op_t op, void *ctx)
|
||||
uuid = gf_strdup (uuid_str);
|
||||
ret = dict_set_dynstr (op_ctx, key,
|
||||
uuid);
|
||||
if (ret != 0) {
|
||||
GF_FREE (uuid);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user