1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-22 22:04:08 +03:00

s3:winbindd: Remove dead code from sam_rids_to_names()

domain_name is never NULL in this case. Found by covscan.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Andreas Schneider 2021-12-14 15:46:05 +01:00 committed by Jeremy Allison
parent 116123e921
commit 092e11295a

View File

@ -968,7 +968,6 @@ static NTSTATUS sam_rids_to_names(struct winbindd_domain *domain,
for (i=0; i<num_rids; i++) {
struct dom_sid sid;
char *dom_name = NULL;
char *name = NULL;
sid_compose(&sid, domain_sid, rids[i]);
@ -980,16 +979,10 @@ static NTSTATUS sam_rids_to_names(struct winbindd_domain *domain,
domain,
tmp_ctx,
&sid,
&dom_name,
NULL,
&name,
&types[i]);
if (NT_STATUS_IS_OK(status)) {
if (domain_name == NULL) {
domain_name = dom_name;
} else {
/* always the same */
TALLOC_FREE(dom_name);
}
names[i] = talloc_move(names, &name);
num_mapped += 1;
}