diff options
author | Rob Crittenden <rcritten@redhat.com> | 2013-08-27 17:34:46 -0400 |
---|---|---|
committer | Petr Viktorin <pviktori@redhat.com> | 2013-08-29 15:26:57 +0200 |
commit | 0688827f3c287c1ec354f90e4748b0c23c4c9883 (patch) | |
tree | 981ef2a4ec8abe161955acc54d17b2b4bc73eef9 | |
parent | 5945988d7373d65d5a38b11ade84fabe9ac7bb68 (diff) | |
download | freeipa.git-0688827f3c287c1ec354f90e4748b0c23c4c9883.tar.gz freeipa.git-0688827f3c287c1ec354f90e4748b0c23c4c9883.tar.xz freeipa.git-0688827f3c287c1ec354f90e4748b0c23c4c9883.zip |
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
-rw-r--r-- | daemons/ipa-slapi-plugins/ipa-lockout/ipa_lockout.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/daemons/ipa-slapi-plugins/ipa-lockout/ipa_lockout.c b/daemons/ipa-slapi-plugins/ipa-lockout/ipa_lockout.c index 9e903aaf..fd6602fd 100644 --- a/daemons/ipa-slapi-plugins/ipa-lockout/ipa_lockout.c +++ b/daemons/ipa-slapi-plugins/ipa-lockout/ipa_lockout.c @@ -244,9 +244,8 @@ int ipalockout_getpolicy(Slapi_Entry *target_entry, Slapi_Entry **policy_entry, if (ldrc == 0) { Slapi_Value *sv = NULL; - slapi_valueset_first_value(*values, &sv); - if (values != NULL) { + slapi_valueset_first_value(*values, &sv); *policy_dn = slapi_value_get_string(sv); } } |