diff options
author | Yaniv Kaul <ykaul@redhat.com> | 2020-01-12 16:33:54 +0200 |
---|---|---|
committer | Xavi Hernandez <xhernandez@redhat.com> | 2020-01-21 12:28:07 +0000 |
commit | 44602465081ea5fb38255ad68d3ed8e987190d1f (patch) | |
tree | dd7bd780490f98406315a2834cc647841076ac8c /xlators/mgmt/glusterd/src | |
parent | 3aa0928623393aa9c296abf32d4726d02a454207 (diff) |
dictionary: remove the 'extra_free' parameter
This parameter may have been used in the past, but is no longer
needed. Removing it and the few locations it was actually referenced.
This allows to remove an extra memdup as well, that was not needed
in the 1st place in server_setvolume() and unserialize_rsp_direntp()
functions.
A followup separate patch will remove extra_stdfree parmeter
from the dictionary structure.
Change-Id: Ica0ff0a330672373aaa60e808b7e76ec489a0fe3
updates: bz#1193929
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-handshake.c | 7 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-svc-helper.c | 3 |
2 files changed, 6 insertions, 4 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-handshake.c b/xlators/mgmt/glusterd/src/glusterd-handshake.c index 1cbdc304916..7cb70fcb4e2 100644 --- a/xlators/mgmt/glusterd/src/glusterd-handshake.c +++ b/xlators/mgmt/glusterd/src/glusterd-handshake.c @@ -1052,11 +1052,9 @@ __server_getspec(rpcsvc_request_t *req) if (ret) { gf_msg(this->name, GF_LOG_ERROR, 0, GD_MSG_DICT_SERL_LENGTH_GET_FAIL, - "Failed to serialize dict " - "to request buffer"); + "Failed to serialize dict to request buffer"); goto fail; } - dict->extra_free = rsp.xdata.xdata_val; } /* to allocate the proper buffer to hold the file data */ @@ -1131,6 +1129,9 @@ fail: if (args.xdata.xdata_val) free(args.xdata.xdata_val); + if (rsp.xdata.xdata_val) + GF_FREE(rsp.xdata.xdata_val); + return 0; } diff --git a/xlators/mgmt/glusterd/src/glusterd-svc-helper.c b/xlators/mgmt/glusterd/src/glusterd-svc-helper.c index a27838bb50e..d267df15d44 100644 --- a/xlators/mgmt/glusterd/src/glusterd-svc-helper.c +++ b/xlators/mgmt/glusterd/src/glusterd-svc-helper.c @@ -838,7 +838,6 @@ __glusterd_send_svc_configure_req(glusterd_svc_t *svc, int flags, "to request buffer"); goto *errlbl; } - dict->extra_free = brick_req.dict.dict_val; } frame->cookie = svc; @@ -900,6 +899,8 @@ maybe_free_iobuf: err: if (dict) dict_unref(dict); + if (brick_req.dict.dict_val) + GF_FREE(brick_req.dict.dict_val); GF_FREE(volfile_content); if (spec_fd >= 0) |