summaryrefslogtreecommitdiffstats
path: root/src/providers/ldap/sdap_async_groups.c
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2012-02-14 12:30:55 +0100
committerStephen Gallagher <sgallagh@redhat.com>2012-02-14 09:43:14 -0500
commit29b412285db72b0c735e8ad6cb933c029d2a27d9 (patch)
tree658a19633fcfafff1243831e8ac904a07317bb16 /src/providers/ldap/sdap_async_groups.c
parent48f82b73c24d2486f10e588ebabce95873656d0e (diff)
downloadsssd_unused-29b412285db72b0c735e8ad6cb933c029d2a27d9.tar.gz
sssd_unused-29b412285db72b0c735e8ad6cb933c029d2a27d9.tar.xz
sssd_unused-29b412285db72b0c735e8ad6cb933c029d2a27d9.zip
Fix memory hierarchy when processing nested group memberships
https://fedorahosted.org/sssd/ticket/1186
Diffstat (limited to 'src/providers/ldap/sdap_async_groups.c')
-rw-r--r--src/providers/ldap/sdap_async_groups.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/providers/ldap/sdap_async_groups.c b/src/providers/ldap/sdap_async_groups.c
index feb13db9..061a99c8 100644
--- a/src/providers/ldap/sdap_async_groups.c
+++ b/src/providers/ldap/sdap_async_groups.c
@@ -1323,10 +1323,10 @@ static void sdap_get_groups_process(struct tevent_req *subreq)
}
/* Copy the new groups into the list
- * They're already allocated on 'state'
*/
for (i = 0; i < count; i++) {
- state->groups[state->count + i] = groups[i];
+ state->groups[state->count + i] =
+ talloc_steal(state->groups, groups[i]);
}
state->count += count;