>From b42f5e0608d419b4f2223ba05c26f2b452f946d0 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Thu, 15 Nov 2012 10:02:54 +0100 Subject: [PATCH 3/4] LDAP: use the correct memory context The element being reallocated is part of the "group_attrs" array, not attrs. --- 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 45832774a3f85ebea1464ba6a86f4d5b39f1e31d..62ea6161f533606e34d4a3c259ba900fe0a13606 100644 --- a/src/providers/ldap/sdap_async_groups.c +++ b/src/providers/ldap/sdap_async_groups.c @@ -438,7 +438,7 @@ static int sdap_save_group(TALLOC_CTX *memctx, /* Now process RFC2307bis ghost hash table */ if (cnt > 0) { - el->values = talloc_realloc(attrs, el->values, struct ldb_val, + el->values = talloc_realloc(group_attrs, el->values, struct ldb_val, cnt); if (el->values == NULL) { ret = ENOMEM; -- 1.8.0