From 73851471133f0345945a4232c5dc147be26f9941 Mon Sep 17 00:00:00 2001 From: Pavel Zuna Date: Wed, 5 Oct 2011 12:54:46 -0400 Subject: Fix small bug where TALLOC_CTX could end up unfreed. --- src/providers/ldap/sdap_async_groups.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/providers/ldap/sdap_async_groups.c') diff --git a/src/providers/ldap/sdap_async_groups.c b/src/providers/ldap/sdap_async_groups.c index 2b48af928..1e8e4b3d8 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")); -- cgit