summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2011-10-31 13:08:23 +0100
committerStephen Gallagher <sgallagh@redhat.com>2011-10-31 10:15:12 -0400
commitdb90c1b60c729995f34af2431ede61ea7493e540 (patch)
tree99698fc2de5fcab63a2b394cb95ff31b04071ac5
parent25e0627808739981c27b96ad761e863c302aa1a2 (diff)
downloadsssd-db90c1b60c729995f34af2431ede61ea7493e540.tar.gz
sssd-db90c1b60c729995f34af2431ede61ea7493e540.tar.xz
sssd-db90c1b60c729995f34af2431ede61ea7493e540.zip
Steal result onto mem_ctx in sdap_initgr_nested_get_direct_parents
-rw-r--r--src/providers/ldap/sdap_async_accounts.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/providers/ldap/sdap_async_accounts.c b/src/providers/ldap/sdap_async_accounts.c
index ccfafa1fb..daefaacb7 100644
--- a/src/providers/ldap/sdap_async_accounts.c
+++ b/src/providers/ldap/sdap_async_accounts.c
@@ -3104,7 +3104,6 @@ static int sdap_initgr_nested_get_direct_parents(TALLOC_CTX *mem_ctx,
tmp_ctx = talloc_new(NULL);
if (!tmp_ctx) return ENOMEM;
-
direct_groups = talloc_zero_array(tmp_ctx, struct sysdb_attrs *,
ngroups + 1);
if (!direct_groups) {
@@ -3146,7 +3145,7 @@ static int sdap_initgr_nested_get_direct_parents(TALLOC_CTX *mem_ctx,
DEBUG(9, ("The group [%s] has %d direct parents\n", orig_dn, ndirect));
- *_direct_parents = direct_groups;
+ *_direct_parents = talloc_steal(mem_ctx, direct_groups);
*_ndirect = ndirect;
ret = EOK;
done: