summaryrefslogtreecommitdiffstats
path: root/src/providers/ldap/sdap_async_users.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_users.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_users.c')
-rw-r--r--src/providers/ldap/sdap_async_users.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/providers/ldap/sdap_async_users.c b/src/providers/ldap/sdap_async_users.c
index fa9c0a799..a8595ac89 100644
--- a/src/providers/ldap/sdap_async_users.c
+++ b/src/providers/ldap/sdap_async_users.c
@@ -528,7 +528,8 @@ static void sdap_get_users_process(struct tevent_req *subreq)
* They're already allocated on 'state'
*/
for (i = 0; i < count; i++) {
- state->users[state->count + i] = users[i];
+ state->users[state->count + i] =
+ talloc_steal(state->users, users[i]);
}
state->count += count;