From a663086f53dc892453d40483e629686bb1f411d2 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Nov 19 2012 13:21:00 +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 b8457e6..0c33439 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;