diff options
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-snapshot.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot.c b/xlators/mgmt/glusterd/src/glusterd-snapshot.c index 00fc7daa0..48a5b7be7 100644 --- a/xlators/mgmt/glusterd/src/glusterd-snapshot.c +++ b/xlators/mgmt/glusterd/src/glusterd-snapshot.c @@ -2276,8 +2276,11 @@ glusterd_handle_snapshot_fn (rpcsvc_request_t *req) goto out; } ret = dict_set_dynstr (dict, "host-uuid", host_uuid); - if (ret) + if (ret) { + GF_FREE (host_uuid); goto out; + } + } else { gf_log (this->name, GF_LOG_ERROR, "request dict length is %d", @@ -2307,7 +2310,6 @@ glusterd_handle_snapshot_fn (rpcsvc_request_t *req) out: if (ret) { - GF_FREE (host_uuid); if (err_str[0] == '\0') snprintf (err_str, sizeof (err_str), "Operation failed"); |