mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Re-order NULL check in ipa_lockout.
There is no risk of crash here as slapi_valueset_first_value() can handle the case where the valueset is NULL, but there is no point in calling that if we know there are no values. https://fedorahosted.org/freeipa/ticket/3880
This commit is contained in:
parent
f742520760
commit
3940a574f9
@ -244,9 +244,8 @@ int ipalockout_getpolicy(Slapi_Entry *target_entry, Slapi_Entry **policy_entry,
|
|||||||
if (ldrc == 0) {
|
if (ldrc == 0) {
|
||||||
Slapi_Value *sv = NULL;
|
Slapi_Value *sv = NULL;
|
||||||
|
|
||||||
slapi_valueset_first_value(*values, &sv);
|
|
||||||
|
|
||||||
if (values != NULL) {
|
if (values != NULL) {
|
||||||
|
slapi_valueset_first_value(*values, &sv);
|
||||||
*policy_dn = slapi_value_get_string(sv);
|
*policy_dn = slapi_value_get_string(sv);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user