summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/providers/ldap/sdap_async_groups.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/providers/ldap/sdap_async_groups.c b/src/providers/ldap/sdap_async_groups.c
index 2b48af92..1e8e4b3d 100644
--- a/src/providers/ldap/sdap_async_groups.c
+++ b/src/providers/ldap/sdap_async_groups.c
@@ -1530,14 +1530,14 @@ static errno_t sdap_nested_group_populate_users(struct sysdb_ctx *sysdb,
static const char *search_attrs[] = { SYSDB_NAME, NULL };
size_t count;
- tmp_ctx = talloc_new(NULL);
- if (!tmp_ctx) return ENOMEM;
-
if (num_users == 0) {
/* Nothing to do if there are no users */
return EOK;
}
+ tmp_ctx = talloc_new(NULL);
+ if (!tmp_ctx) return ENOMEM;
+
ret = sysdb_transaction_start(sysdb);
if (ret) {
DEBUG(1, ("Failed to start transaction!\n"));