diff options
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-op-sm.c | 3 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-utils.c | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c index 52fa9ecd62c..14f03a9a56a 100644 --- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c +++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c @@ -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); + } } } } 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); |