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
&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;
}