>From 86ccbcf7a1ab35b4521ccfe6688f0585108a6ad7 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Thu, 15 Nov 2012 07:11:33 +0100 Subject: [PATCH 1/4] 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 f0185e41c730b0f30acfdb7c22b7bc3a60df6cf5..b461973bc2f73ac43d70e0e2693f122bfdc9f00f 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; -- 1.8.0