summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorarao <arao@redhat.com>2015-02-11 16:59:10 +0530
committerKrishnan Parthasarathi <kparthas@redhat.com>2015-06-10 01:38:59 -0700
commit9307b943947daa1fe93afdeef5bfae606423b38a (patch)
treebb9d5710551e881a9cb8f8ab4e9ba8c8d455c19d /xlators
parentf6a062044a3447bea5bf0fcf21a3f85c00fb6c7d (diff)
glusterd: Dereference after null check
CID: 1124588 CID: 1124589 CID: 1124590 CID: 1124591 Either the null pointer is dereferenced before the null check or the check for null is unnecessary Change-Id: I87c6b09a4b89c33afd402866e6e249fefb1330f0 BUG: 789278 Signed-off-by: arao <arao@redhat.com> Reviewed-on: http://review.gluster.org/9636 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-rpc-ops.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c b/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c
index 098e489d7ae..90bbd0cc40d 100644
--- a/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c
+++ b/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c
@@ -1641,8 +1641,8 @@ glusterd_cluster_lock (call_frame_t *frame, xlator_t *this,
this, glusterd_cluster_lock_cbk,
(xdrproc_t)xdr_gd1_mgmt_cluster_lock_req);
out:
- gf_log (this->name, GF_LOG_DEBUG, "Returning %d", ret);
- return ret;
+ gf_log ("glusterd", GF_LOG_DEBUG, "Returning %d", ret);
+ return ret;
}
int32_t
@@ -1822,7 +1822,9 @@ glusterd_cluster_unlock (call_frame_t *frame, xlator_t *this,
this, glusterd_cluster_unlock_cbk,
(xdrproc_t)xdr_gd1_mgmt_cluster_unlock_req);
out:
- gf_log (this->name, GF_LOG_DEBUG, "Returning %d", ret);
+ gf_log (this ? this->name : "glusterd",
+ GF_LOG_DEBUG, "Returning %d", ret);
+
return ret;
}
@@ -1880,7 +1882,9 @@ out:
if ((_gf_true == is_alloc) && req.buf.buf_val)
GF_FREE (req.buf.buf_val);
- gf_log (this->name, GF_LOG_DEBUG, "Returning %d", ret);
+ gf_log (this ? this->name : "glusterd",
+ GF_LOG_DEBUG, "Returning %d", ret);
+
return ret;
}
@@ -2193,7 +2197,10 @@ out:
txn_id, data);
opinfo.op_ret = ret;
}
- gf_log (this->name, GF_LOG_DEBUG, "Returning %d", ret);
+
+ gf_log (this ? this->name : "glusterd",
+ GF_LOG_DEBUG, "Returning %d", ret);
+
return ret;
}