From c9e8154b32fb3fea639478c203bb1079c18e7bca Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Thu, 15 Nov 2012 07:11:33 +0100 Subject: LDAP: Allocate the temporary context on NULL, not memctx Allocating temporary context on NULL helps vind memory leaks with valgrind and avoid growing memory over time by allocating on a long-lived context. --- src/providers/ldap/sdap_async_groups.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/providers/ldap/sdap_async_groups.c b/src/providers/ldap/sdap_async_groups.c index 3948a7436..ce08b88a8 100644 --- a/src/providers/ldap/sdap_async_groups.c +++ b/src/providers/ldap/sdap_async_groups.c @@ -226,7 +226,7 @@ static int sdap_save_group(TALLOC_CTX *memctx, hash_key_t key; hash_value_t value; - tmpctx = talloc_new(memctx); + tmpctx = talloc_new(NULL); if (!tmpctx) { ret = ENOMEM; goto fail; -- cgit