summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLukas Slebodnik <lslebodn@redhat.com>2014-08-22 19:45:05 +0200
committerJakub Hrozek <jhrozek@redhat.com>2014-08-26 17:22:16 +0200
commit21f2821a4420291c8eb3ee9d427e9e1b0a1d9989 (patch)
treeffe5115fae3b2a4397a5e97e149b1e4321ae50b4 /src
parent5c075562ac687f7102c7c940fec2e82da378bfff (diff)
downloadsssd-21f2821a4420291c8eb3ee9d427e9e1b0a1d9989.tar.gz
sssd-21f2821a4420291c8eb3ee9d427e9e1b0a1d9989.tar.xz
sssd-21f2821a4420291c8eb3ee9d427e9e1b0a1d9989.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>
Diffstat (limited to 'src')
-rw-r--r--src/providers/ldap/sdap_async_initgroups_ad.c2
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 08e012d0f..a80bccbcc 100644
--- a/src/providers/ldap/sdap_async_initgroups_ad.c
+++ b/src/providers/ldap/sdap_async_initgroups_ad.c
@@ -567,7 +567,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;
}