From bda38dde09b6975495437620d8c10f39e41af7be Mon Sep 17 00:00:00 2001 From: Michal Zidek Date: Fri, 4 Apr 2014 14:09:24 +0200 Subject: Possible null dereference in SELinux code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Lukáš Slebodník (cherry picked from commit 7ac7dec08ec2c82a86fd6a90388993cfcee26da1) --- src/providers/ipa/ipa_selinux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/providers/ipa/ipa_selinux.c b/src/providers/ipa/ipa_selinux.c index b7cbe445f..784c5ab49 100644 --- a/src/providers/ipa/ipa_selinux.c +++ b/src/providers/ipa/ipa_selinux.c @@ -278,7 +278,7 @@ static void ipa_selinux_handler_done(struct tevent_req *req) goto fail; } - if (map_count > 0 && maps != NULL) { + if (map_count > 0) { ret = ipa_save_user_maps(sysdb, op_ctx->ipa_domain, map_count, maps); if (ret != EOK) { goto fail; @@ -1302,7 +1302,7 @@ ipa_get_selinux_recv(struct tevent_req *req, *default_user = NULL; } - if (state->selinuxmaps != NULL) { + if (state->selinuxmaps != NULL && state->nmaps != 0) { *count = state->nmaps; *maps = talloc_steal(mem_ctx, state->selinuxmaps); } else { -- cgit