summaryrefslogtreecommitdiffstats
path: root/xlators/nfs/server/src/nfs3.c
diff options
context:
space:
mode:
authorShwetha Acharya <sacharya@redhat.com>2018-09-18 15:40:29 +0530
committerAmar Tumballi <amarts@redhat.com>2018-09-21 05:16:32 +0000
commitbbcec1a1caf95aad581083e7131feda04295f299 (patch)
tree590c77f38c3733163e9463ed0b10ff6eacaf42d6 /xlators/nfs/server/src/nfs3.c
parent2fd9d62691056b9f0601dbc2bf6f42626b015d07 (diff)
nfs/server: NULL pointer dereferencing clang fix
Added some condition checks in nfs3.c and nlm4.c Updates: bz#1622665 Change-Id: Ia10b8fff14f651df1360c9bb79d4476b282f54b5 Signed-off-by: Shwetha Acharya <sacharya@redhat.com>
Diffstat (limited to 'xlators/nfs/server/src/nfs3.c')
-rw-r--r--xlators/nfs/server/src/nfs3.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/nfs/server/src/nfs3.c b/xlators/nfs/server/src/nfs3.c
index 42799bdfd38..eaae4ebd12d 100644
--- a/xlators/nfs/server/src/nfs3.c
+++ b/xlators/nfs/server/src/nfs3.c
@@ -771,7 +771,7 @@ nfs3_request_xlator_deviceid(rpcsvc_request_t *rq)
xl = rpcsvc_request_private(rq);
nfs3 = rpcsvc_request_program_private(rq);
- if (gf_nfs_dvm_off(nfs_state(nfs3->nfsx)))
+ if (nfs3 && (gf_nfs_dvm_off(nfs_state(nfs3->nfsx))))
devid = (uint64_t)nfs_xlator_to_xlid(nfs3->exportslist, xl);
else {
__nfs3_get_volume_id(nfs3, xl, volumeid);