diff options
author | Krutika Dhananjay <kdhananj@redhat.com> | 2012-10-22 15:30:49 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2013-02-03 12:35:09 -0800 |
commit | 9708bd1f922ca38973cba65b4890c67c2edc6e2b (patch) | |
tree | 7a8853809eb1244952718a77e9786d3392b7402a /xlators/mgmt/glusterd/src/glusterd-brick-ops.c | |
parent | 6b262d20940b088a1d72ad5518cc4908a7316b5a (diff) |
glusterd: do dict unref after sending reply to cli
This patch channelizes dict unrefs of dictionaries created from the cli
req during volume ops to one common function - glusterd_to_cli() - which
is guaranteed to be called irrespective of whether the command succeeds
or fails.
This patch also removes extra unrefs at a few places.
Change-Id: Ic8ba7166387b5dfd1f5ae860539e1b7093a94662
BUG: 861044
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/4003
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-brick-ops.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-brick-ops.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c index 19ae2ca2136..fe556afef41 100644 --- a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c +++ b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c @@ -528,8 +528,6 @@ out: cli_rsp = &rsp; glusterd_to_cli (req, cli_rsp, NULL, 0, NULL, (xdrproc_t)xdr_gf_cli_rsp, dict); - if (dict) - dict_unref (dict); ret = 0; //sent error to cli, prevent second reply } @@ -833,8 +831,6 @@ out: cli_rsp = &rsp; glusterd_to_cli (req, cli_rsp, NULL, 0, NULL, (xdrproc_t)xdr_gf_cli_rsp, dict); - if (dict) - dict_unref (dict); ret = 0; //sent error to cli, prevent second reply |