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:25:42 +0200 |
commit | 97e5ea0490f05107c5d4d1773841b4a533b737f2 (patch) | |
tree | f8c4d7463a47bff2be2ea853d5dfba779dfb19a2 | |
parent | 1cd03a904769a23c624abcfc6916f767f993d60d (diff) | |
download | sssd-97e5ea0490f05107c5d4d1773841b4a533b737f2.tar.gz sssd-97e5ea0490f05107c5d4d1773841b4a533b737f2.tar.xz sssd-97e5ea0490f05107c5d4d1773841b4a533b737f2.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; } |