summaryrefslogtreecommitdiffstats
path: root/api/src/glfs-handleops.c
diff options
context:
space:
mode:
authorAmar Tumballi <amarts@redhat.com>2019-05-20 11:11:39 +0530
committerAmar Tumballi <amarts@redhat.com>2019-06-04 10:30:29 +0000
commite7aeab3063ac5645136303278b477d7de35266c0 (patch)
tree73ab2e1ea4e26b1019318178d114c3d89dc34301 /api/src/glfs-handleops.c
parentabc4d4cfa01d922c46ebb1abfa5d801ba8c6b5c8 (diff)
across: clang-scan: fix NULL dereferencing warnings
All these checks are done after analyzing clang-scan report produced by the CI job @ https://build.gluster.org/job/clang-scan updates: bz#1622665 Change-Id: I590305af4ceb779be952974b2a36066ffc4865ca Signed-off-by: Amar Tumballi <amarts@redhat.com>
Diffstat (limited to 'api/src/glfs-handleops.c')
-rw-r--r--api/src/glfs-handleops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/api/src/glfs-handleops.c b/api/src/glfs-handleops.c
index d4e154526ab..8b4307e1096 100644
--- a/api/src/glfs-handleops.c
+++ b/api/src/glfs-handleops.c
@@ -2216,7 +2216,7 @@ pub_glfs_h_poll_upcall370(struct glfs *fs, struct glfs_callback_arg *up_arg)
ret = pub_glfs_h_poll_upcall(fs, &upcall);
if (ret == 0) {
up_arg->fs = fs;
- if (errno == ENOENT || upcall->event == NULL) {
+ if ((errno == ENOENT) || !upcall || !upcall->event) {
up_arg->reason = GLFS_UPCALL_EVENT_NULL;
goto out;
}