>From 4306d117a74d627308de04d8401f9c4ce395f942 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 67dddae70030c8de8326918b6b1e17349af7e33a..a4891e33d9f1fd03b2be21e587111b3a54a4449f 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