summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authornishith-vihar <77044911+nishith-vihar@users.noreply.github.com>2021-01-20 17:11:45 +0530
committerGitHub <noreply@github.com>2021-01-20 12:41:45 +0100
commit01baeecff7f1e1da55543b7f79b4b519b5bec267 (patch)
tree0a134e491f47132677cf7bcbba5e9356807a3336 /xlators
parent4fac2f73bfc3211e7b33b38f38c83ff39dbd1694 (diff)
downloadglusterfs-01baeecff7f1e1da55543b7f79b4b519b5bec267.tar.gz
glusterfs-01baeecff7f1e1da55543b7f79b4b519b5bec267.tar.xz
glusterfs-01baeecff7f1e1da55543b7f79b4b519b5bec267.zip
Dereference after null reference (CID:1124543) (#2023)
'this' pointer was being dereferenced after null check. This change avoids it. Change-Id: I7dedee44c08df481d2a037eb601f3d5c4d9284f5 Updates: #1060 Signed-off-by: Nishith Vihar Sakinala <nsakinal@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-handshake.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-handshake.c b/xlators/mgmt/glusterd/src/glusterd-handshake.c
index 38ce54a3fe..e831c1a3c5 100644
--- a/xlators/mgmt/glusterd/src/glusterd-handshake.c
+++ b/xlators/mgmt/glusterd/src/glusterd-handshake.c
@@ -1945,12 +1945,6 @@ gd_validate_peer_op_version(xlator_t *this, glusterd_peerinfo_t *peerinfo,
goto out;
}
- if (!this) {
- gf_smsg("glusterd", GF_LOG_ERROR, errno, GD_MSG_XLATOR_NOT_DEFINED,
- NULL);
- goto out;
- }
-
if (!peerinfo) {
gf_smsg("glusterd", GF_LOG_ERROR, errno, GD_MSG_INVALID_ARGUMENT, NULL);
goto out;