summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKrutika Dhananjay <kdhananj@redhat.com>2013-05-13 20:23:23 +0530
committerVijay Bellur <vbellur@redhat.com>2013-05-16 08:28:33 -0700
commit8ee88f074fa1b29c77f6b0f6ef1e027e25bddb04 (patch)
tree3794e95591426e50a782fd0525c07174cf53d055
parent3c34e97027ec614582559ac65c530eb290cfa7c9 (diff)
glusterd: Perform NULL check on rsp.op_errstr before using it
Change-Id: I2ae30f08965b26a21db541f87de78772cb17135a BUG: 962362 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/4996 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-syncop.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-syncop.c b/xlators/mgmt/glusterd/src/glusterd-syncop.c
index 68720bdda..cebf19778 100644
--- a/xlators/mgmt/glusterd/src/glusterd-syncop.c
+++ b/xlators/mgmt/glusterd/src/glusterd-syncop.c
@@ -460,8 +460,7 @@ gd_syncop_brick_op_cbk (struct rpc_req *req, struct iovec *iov,
args->errstr = gf_strdup (rsp.op_errstr);
out:
- if (strcmp (rsp.op_errstr, "") != 0)
- free (rsp.op_errstr);
+ free (rsp.op_errstr);
free (rsp.output.output_val);
STACK_DESTROY (frame->root);