‘user_info_dc->sids’ must live for at least as long as ‘user_info_dc’,
or a use-after-free may result.
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* tries to call talloc_realloc() on the original or the copy
* will fail when called for any referenced talloc context.
*/
- user_info_dc->sids = talloc_memdup(mem_ctx,
+ user_info_dc->sids = talloc_memdup(user_info_dc,
user_info_dc->sids,
talloc_get_size(user_info_dc->sids));
if (user_info_dc->sids == NULL) {