summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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 720ce96c..d34b8849 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;
}