diff options
author | Lukas Slebodnik <lslebodn@redhat.com> | 2014-08-22 19:45:05 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2014-08-26 17:34:38 +0200 |
commit | f25e4324c697c5abc4edc5cc0f34a5952248749a (patch) | |
tree | 03ebac0e46ea37a30060382f800b2de246f02932 | |
parent | ba327d62561c86284328f86d7a3317998329dffd (diff) | |
download | sssd-f25e4324c697c5abc4edc5cc0f34a5952248749a.tar.gz sssd-f25e4324c697c5abc4edc5cc0f34a5952248749a.tar.xz sssd-f25e4324c697c5abc4edc5cc0f34a5952248749a.zip |
SDAP: Immediately finish request for empty array
If array of sids is empty we needn't try to resolve them
and we can immediately finish request in function sdap_ad_resolve_sids_send
This patch is just a small optimisation.
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
(cherry picked from commit 21f2821a4420291c8eb3ee9d427e9e1b0a1d9989)
-rw-r--r-- | src/providers/ldap/sdap_async_initgroups_ad.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/providers/ldap/sdap_async_initgroups_ad.c b/src/providers/ldap/sdap_async_initgroups_ad.c index 394a5b0e9..351aca5da 100644 --- a/src/providers/ldap/sdap_async_initgroups_ad.c +++ b/src/providers/ldap/sdap_async_initgroups_ad.c @@ -569,7 +569,7 @@ sdap_ad_resolve_sids_send(TALLOC_CTX *mem_ctx, state->sids = sids; state->index = 0; - if (state->sids == NULL) { + if (state->sids == NULL || state->sids[0] == NULL) { ret = EOK; goto immediately; } |