From 3620e966029229a7c246d1b79b0d3977699e6ab9 Mon Sep 17 00:00:00 2001 From: Pavel Zuna Date: Wed, 5 Oct 2011 13:25:24 -0400 Subject: Fix small bug where TALLOC_CTX could end up unfreed. --- src/providers/ldap/sdap_async_accounts.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/providers/ldap/sdap_async_accounts.c b/src/providers/ldap/sdap_async_accounts.c index 40b213d8..2e1235ce 100644 --- a/src/providers/ldap/sdap_async_accounts.c +++ b/src/providers/ldap/sdap_async_accounts.c @@ -2056,14 +2056,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")); -- cgit