summaryrefslogtreecommitdiffstats
path: root/xlators/system
diff options
context:
space:
mode:
authorVijay Bellur <vbellur@redhat.com>2018-08-13 11:33:47 -0700
committerAmar Tumballi <amarts@redhat.com>2018-08-17 03:04:09 +0000
commitd17cccd520700eea30a7ed8b49eaf26f34e37ac2 (patch)
tree8f797198ce97a9fa06fe6d2ff286b22395f920a4 /xlators/system
parentfa16371475a115213390cd84d38cec75032f24d4 (diff)
features/acl: Fix a possible null dereference
Addresses CID 1370952 Change-Id: I1f157dbede32e74e38aed8a1a162e38107f2628d updates: bz#789278 Signed-off-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/system')
-rw-r--r--xlators/system/posix-acl/src/posix-acl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/xlators/system/posix-acl/src/posix-acl.c b/xlators/system/posix-acl/src/posix-acl.c
index aadd6fc9bb1..ccede3b1e8b 100644
--- a/xlators/system/posix-acl/src/posix-acl.c
+++ b/xlators/system/posix-acl/src/posix-acl.c
@@ -251,11 +251,12 @@ posix_acl_log_permit_denied (call_frame_t *frame, inode_t *inode, int want,
struct posix_acl_ctx *ctx, struct posix_acl *acl)
{
char *acl_str = NULL;
- client_t *client = frame->root->client;
+ client_t *client = NULL;
- if (!frame || !inode || !ctx)
+ if (!frame || !inode || !ctx || !frame->root)
goto out;
+ client = frame->root->client;
posix_acl_get_acl_string (frame, acl, &acl_str);
gf_msg (frame->this->name, GF_LOG_INFO, EACCES, POSIX_ACL_MSG_EACCES,