summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2012-11-15 07:11:33 +0100
committerJakub Hrozek <jhrozek@redhat.com>2012-11-19 14:36:16 +0100
commit84f06af2ef1ad15a42e666881fdea11e8ca6607d (patch)
treee025adf20a967ba7e1c1dd0816c3dc3687855f52
parent01c94d1bc4d80b8ff23401462dfe4dca7148adb1 (diff)
downloadsssd-84f06af2ef1ad15a42e666881fdea11e8ca6607d.tar.gz
sssd-84f06af2ef1ad15a42e666881fdea11e8ca6607d.tar.xz
sssd-84f06af2ef1ad15a42e666881fdea11e8ca6607d.zip
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.
-rw-r--r--src/providers/ldap/sdap_async_groups.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/providers/ldap/sdap_async_groups.c b/src/providers/ldap/sdap_async_groups.c
index 992678e98..5fea0b474 100644
--- a/src/providers/ldap/sdap_async_groups.c
+++ b/src/providers/ldap/sdap_async_groups.c
@@ -225,7 +225,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;