diff options
author | Amar Tumballi <amarts@redhat.com> | 2019-05-20 11:11:39 +0530 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2019-06-04 10:30:29 +0000 |
commit | e7aeab3063ac5645136303278b477d7de35266c0 (patch) | |
tree | 73ab2e1ea4e26b1019318178d114c3d89dc34301 /xlators/features/marker/src/marker-quota.c | |
parent | abc4d4cfa01d922c46ebb1abfa5d801ba8c6b5c8 (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 'xlators/features/marker/src/marker-quota.c')
-rw-r--r-- | xlators/features/marker/src/marker-quota.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/xlators/features/marker/src/marker-quota.c b/xlators/features/marker/src/marker-quota.c index 31584f5446b..4176ab6a8f1 100644 --- a/xlators/features/marker/src/marker-quota.c +++ b/xlators/features/marker/src/marker-quota.c @@ -2063,6 +2063,9 @@ mq_inspect_directory_xattr(xlator_t *this, quota_inode_ctx_t *ctx, if (ret < 0) goto create_xattr; + if (!contribution) + goto create_xattr; + if (!loc_is_root(loc)) { GET_CONTRI_KEY(this, contri_key, contribution->gfid, keylen); if (keylen < 0) { |