From a2fba7ed4c138d8fef6a5f0e17a249225b85359c Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Nov 19 2012 13:24:03 +0000 Subject: LDAP: use the correct memory context The element being reallocated is part of the "group_attrs" array, not attrs. --- diff --git a/src/providers/ldap/sdap_async_groups.c b/src/providers/ldap/sdap_async_groups.c index 7cdf2fa..4872b85 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;