summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2011-10-31 13:08:23 +0100
committerStephen Gallagher <sgallagh@redhat.com>2012-06-14 15:01:37 -0400
commitd162c73fd03eeb4b2a8ea358efe4e116f00f3c90 (patch)
tree635d46c295bd97bc74850d68789ff4bfdf22b887
parent80d985175892087ad2e65dee40619d2b1fd1ac39 (diff)
downloadsssd-d162c73fd03eeb4b2a8ea358efe4e116f00f3c90.tar.gz
sssd-d162c73fd03eeb4b2a8ea358efe4e116f00f3c90.tar.xz
sssd-d162c73fd03eeb4b2a8ea358efe4e116f00f3c90.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 0fad83c57..39caf9518 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: