summaryrefslogtreecommitdiffstats
path: root/src/providers
diff options
context:
space:
mode:
Diffstat (limited to 'src/providers')
-rw-r--r--src/providers/ldap/sdap_async_accounts.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/providers/ldap/sdap_async_accounts.c b/src/providers/ldap/sdap_async_accounts.c
index 720ce96c1..d34b8849b 100644
--- a/src/providers/ldap/sdap_async_accounts.c
+++ b/src/providers/ldap/sdap_async_accounts.c
@@ -3820,8 +3820,10 @@ sdap_nested_group_check_cache(TALLOC_CTX *mem_ctx,
/* It wasn't found in the groups either */
ret = ENOENT;
done:
- *_msgs = talloc_steal(mem_ctx, msgs);
- *_mtype = mtype;
+ if (ret == EOK || ret == EAGAIN) {
+ *_msgs = talloc_steal(mem_ctx, msgs);
+ *_mtype = mtype;
+ }
talloc_zfree(tmp_ctx);
return ret;
}