>From 02d4f8f665c3f0207f1c2bfb8368925ede3d0b07 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 02c07afcca69d79c089555689a7ba7b42eede235..30069f23660989a4e2b9e5658e7b4724ca141373 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 (ghosts && 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