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:10 -0500
commit3a0522759a7e71b40cc88dba0f5c545b049cf9bf (patch)
tree9efadf8de61e628477be6ac320ea4bb68a7f34b9 /src/providers/ldap/sdap_async_groups.c
parent43abd12a37ea1c410ffb923b9cadfbf0f6ea6e6a (diff)
downloadsssd-3a0522759a7e71b40cc88dba0f5c545b049cf9bf.tar.gz
sssd-3a0522759a7e71b40cc88dba0f5c545b049cf9bf.tar.xz
sssd-3a0522759a7e71b40cc88dba0f5c545b049cf9bf.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 feb13db98..061a99c8e 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;