Fix "no entry" condition when searching PAC info

Fix Covscan-discovered DEADCODE block when searching for PAC info,
caused by a wrong condition being evaluated when entry is a trusted
domain object.

Fixes: https://pagure.io/freeipa/issue/9368

Signed-off-by: Rafael Guterres Jeffman <rjeffman@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
Rafael Guterres Jeffman 2023-04-27 10:46:06 -03:00 committed by Rob Crittenden
parent dd22bd2528
commit fd0fd487df

View File

@ -1086,7 +1086,7 @@ krb5_error_code ipadb_get_pac(krb5_context kcontext,
}
sentry = ldap_first_entry(ipactx->lcontext, sresults);
if (!lentry) {
if (!sentry) {
kerr = ENOENT;
goto done;
}