From 29ddcf3bcb0596fd60cbc090d3f70a2f20d70c72 Mon Sep 17 00:00:00 2001 From: Sumit Bose Date: Fri, 22 Feb 2013 13:30:30 +0100 Subject: [PATCH] ipa-kdb: Dereference after null check in ipa_kdb_mspac.c A wrong logic was used to check ipactx. Fixes https://fedorahosted.org/freeipa/ticket/3424 --- daemons/ipa-kdb/ipa_kdb_mspac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemons/ipa-kdb/ipa_kdb_mspac.c b/daemons/ipa-kdb/ipa_kdb_mspac.c index aeadc6d75..5071348d9 100644 --- a/daemons/ipa-kdb/ipa_kdb_mspac.c +++ b/daemons/ipa-kdb/ipa_kdb_mspac.c @@ -1231,7 +1231,7 @@ static krb5_error_code filter_logon_info(krb5_context context, * */ if (info->info->info3.sidcount != 0) { ipactx = ipadb_get_context(context); - if (!ipactx && !ipactx->mspac) { + if (!ipactx || !ipactx->mspac) { return KRB5_KDB_DBNOTINITED; } count = info->info->info3.sidcount;