summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2011-10-31 13:03:33 +0100
committerStephen Gallagher <sgallagh@redhat.com>2011-10-31 10:15:36 -0400
commitd3bdb23bec3432591acb1135a108ee9bdd5f87e0 (patch)
tree1122395937c7f414d6a529f3a28b7166cf2beae8
parent9aac6b1a195159d5aa0bbbe91fc72ce2c2b021aa (diff)
downloadsssd-d3bdb23bec3432591acb1135a108ee9bdd5f87e0.tar.gz
sssd-d3bdb23bec3432591acb1135a108ee9bdd5f87e0.tar.bz2
sssd-d3bdb23bec3432591acb1135a108ee9bdd5f87e0.zip
Steal result onto mem_ctx in sdap_initgr_nested_get_direct_parents
-rw-r--r--src/providers/ldap/sdap_async_initgroups.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/providers/ldap/sdap_async_initgroups.c b/src/providers/ldap/sdap_async_initgroups.c
index 26bc34f0..1d5c1be6 100644
--- a/src/providers/ldap/sdap_async_initgroups.c
+++ b/src/providers/ldap/sdap_async_initgroups.c
@@ -1096,7 +1096,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) {
@@ -1138,7 +1137,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: