summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt
diff options
context:
space:
mode:
authorKrutika Dhananjay <kdhananj@redhat.com>2013-05-13 14:59:21 +0530
committerVijay Bellur <vbellur@redhat.com>2013-05-13 10:58:46 -0700
commitb9fdbc079025ffd743305cee868e02f653326419 (patch)
tree98d16068d8aa6962c21425a9946816b9bf700724 /xlators/mgmt
parent7ad8b05dc3003102ac192b1bb6bcae5c57e148cf (diff)
glusterd: Perform NULL check on rsp.op_errstr before using it
Change-Id: Id18b215a91cf016964ea98d2f414293b82167d24 BUG: 962362 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/4992 Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/mgmt')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-syncop.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-syncop.c b/xlators/mgmt/glusterd/src/glusterd-syncop.c
index 59df582db77..41530090ec4 100644
--- a/xlators/mgmt/glusterd/src/glusterd-syncop.c
+++ b/xlators/mgmt/glusterd/src/glusterd-syncop.c
@@ -481,7 +481,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)
+ if ((rsp.op_errstr) && (strcmp (rsp.op_errstr, "") != 0))
free (rsp.op_errstr);
free (rsp.output.output_val);