diff options
author | Pranith Kumar K <pranithk@gluster.com> | 2010-09-14 00:54:22 +0000 |
---|---|---|
committer | Vijay Bellur <vijay@dev.gluster.com> | 2010-09-14 00:47:19 -0700 |
commit | b0003a7e789e0618656dd4214195578f53d1e84e (patch) | |
tree | 49ea5c372d6609b5781a7d1f789c3294469b1cba /xlators/mgmt/glusterd/src/glusterd3_1-mops.c | |
parent | 174f963c846331c6dafda169451790b6039ef3fb (diff) |
mgmt/glusterd: free xdr allocations
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
BUG: 1186 ()
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1186
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd3_1-mops.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd3_1-mops.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd3_1-mops.c b/xlators/mgmt/glusterd/src/glusterd3_1-mops.c index eb752a665fd..f9083852e1a 100644 --- a/xlators/mgmt/glusterd/src/glusterd3_1-mops.c +++ b/xlators/mgmt/glusterd/src/glusterd3_1-mops.c @@ -121,9 +121,13 @@ glusterd3_1_probe_cbk (struct rpc_req *req, struct iovec *iov, gf_log ("glusterd", GF_LOG_NORMAL, "Received resp to probe req"); + if (rsp.hostname) + free (rsp.hostname);//malloced by xdr return ret; out: + if (rsp.hostname) + free (rsp.hostname);//malloced by xdr return ret; } @@ -216,6 +220,8 @@ glusterd3_1_friend_add_cbk (struct rpc_req * req, struct iovec *iov, if (ctx) glusterd_destroy_probe_ctx (ctx); out: + if (rsp.hostname) + free (rsp.hostname);//malloced by xdr return ret; } @@ -308,6 +314,8 @@ respond: if (ctx) glusterd_destroy_probe_ctx (ctx); + if (rsp.hostname) + free (rsp.hostname);//malloced by xdr return ret; } @@ -850,7 +858,7 @@ glusterd3_1_friend_update (call_frame_t *frame, xlator_t *this, uuid_unparse (peerinfo->uuid, uuid_buf); snprintf (key, sizeof (key), "friend%d.uuid", count); dup_buf = gf_strdup (uuid_buf); - ret = dict_set_str (friends, key, dup_buf); + ret = dict_set_dynstr (friends, key, dup_buf); if (ret) goto out; snprintf (key, sizeof (key), "friend%d.hostname", count); |