diff options
author | Xavi Hernandez <xhernandez@redhat.com> | 2019-04-17 08:58:57 +0200 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2019-04-19 16:08:50 +0000 |
commit | 02a7a9ef1c0703990d6333b8b800a36da04c9f3e (patch) | |
tree | 8235a9372e1ec97caac974419c11cdfff726e696 /xlators/features/locks/src/common.c | |
parent | 1ad201a9fd6748d7ef49fb073fcfe8c6858d557d (diff) | |
download | glusterfs-02a7a9ef1c0703990d6333b8b800a36da04c9f3e.tar.gz glusterfs-02a7a9ef1c0703990d6333b8b800a36da04c9f3e.tar.xz glusterfs-02a7a9ef1c0703990d6333b8b800a36da04c9f3e.zip |
features/locks: fix coverity issues
This patch fixes the following NULL dereferences identified by Coverity:
* CID 1398619
* CID 1398621
* CID 1398623
* CID 1398625
* CID 1398626
Change-Id: Id6af0d7cba0bb3346005376bc27180e8476255a4
Updates: bz#789278
Signed-off-by: Xavi Hernandez <xhernandez@redhat.com>
Diffstat (limited to 'xlators/features/locks/src/common.c')
-rw-r--r-- | xlators/features/locks/src/common.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/features/locks/src/common.c b/xlators/features/locks/src/common.c index 6e7fb4b2f6..9e06484308 100644 --- a/xlators/features/locks/src/common.c +++ b/xlators/features/locks/src/common.c @@ -478,7 +478,7 @@ pl_inode_get(xlator_t *this, inode_t *inode, pl_local_t *local) unlock: UNLOCK(&inode->lock); - if (pl_is_mandatory_locking_enabled(pl_inode) && + if ((pl_inode != NULL) && pl_is_mandatory_locking_enabled(pl_inode) && pl_inode->check_mlock_info && local) { /* Note: The lock enforcement information per file can be stored in the attribute flag of stat(x) in posix. With that there won't be a need |