From d17cccd520700eea30a7ed8b49eaf26f34e37ac2 Mon Sep 17 00:00:00 2001 From: Vijay Bellur Date: Mon, 13 Aug 2018 11:33:47 -0700 Subject: features/acl: Fix a possible null dereference Addresses CID 1370952 Change-Id: I1f157dbede32e74e38aed8a1a162e38107f2628d updates: bz#789278 Signed-off-by: Vijay Bellur --- xlators/system/posix-acl/src/posix-acl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'xlators/system/posix-acl') 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, -- cgit