diff options
author | Stefan Metzmacher <metze@samba.org> | 2010-07-10 09:04:43 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2010-07-10 09:35:01 +0200 |
commit | 35c554bef02e9acfe9cbec12d1f4ebc1067bedd4 (patch) | |
tree | d40497734580a24a5c8ed4b75374d49f05c6d11e | |
parent | 85f73840b0c64ef8082c8a9665c3cc3caa176c1d (diff) | |
download | samba-35c554bef02e9acfe9cbec12d1f4ebc1067bedd4.tar.gz samba-35c554bef02e9acfe9cbec12d1f4ebc1067bedd4.tar.bz2 samba-35c554bef02e9acfe9cbec12d1f4ebc1067bedd4.zip |
s4:libnet_UserList: allocate children strings on the correct talloc parent
Otherwise the _recv() function won't move the children strings to the
callers memory context and let the callers crash.
metze
-rw-r--r-- | source4/libnet/libnet_user.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/libnet/libnet_user.c b/source4/libnet/libnet_user.c index 0055639974..7f93b3f6d5 100644 --- a/source4/libnet/libnet_user.c +++ b/source4/libnet/libnet_user.c @@ -1138,11 +1138,11 @@ static void continue_users_enumerated(struct tevent_req *subreq) if (composite_nomem(user_sid, c)) return; /* username */ - s->users[i].username = talloc_strdup(c, entry->name.string); + s->users[i].username = talloc_strdup(s->users, entry->name.string); if (composite_nomem(s->users[i].username, c)) return; /* sid string */ - s->users[i].sid = dom_sid_string(c, user_sid); + s->users[i].sid = dom_sid_string(s->users, user_sid); if (composite_nomem(s->users[i].sid, c)) return; } |