mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
s3: libsmb: Fix bug in get_dc_list() introduced by ip-service cleanup.
Do an early return on error. On success assign to the correct variables that are going to get copied into the 'out' parameters. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Noel Power <npower@samba.org> Autobuild-User(master): Noel Power <npower@samba.org> Autobuild-Date(master): Wed Sep 9 10:31:17 UTC 2020 on sn-devel-184
This commit is contained in:
parent
b65fbade02
commit
21de9077a5
@ -3960,11 +3960,11 @@ static NTSTATUS get_dc_list(TALLOC_CTX *ctx,
|
||||
&dc_iplist,
|
||||
&dc_count,
|
||||
resolve_order);
|
||||
if (NT_STATUS_IS_OK(status)) {
|
||||
*ip_list = talloc_move(ctx, &dc_iplist);
|
||||
*ret_count = dc_count;
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
goto out;
|
||||
}
|
||||
TALLOC_FREE(dc_iplist);
|
||||
return_iplist = talloc_move(ctx, &dc_iplist);
|
||||
local_count = dc_count;
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user