]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:winbindd: Remove dead code from sam_rids_to_names()
authorAndreas Schneider <asn@samba.org>
Tue, 14 Dec 2021 14:46:05 +0000 (15:46 +0100)
committerJeremy Allison <jra@samba.org>
Wed, 15 Dec 2021 19:32:30 +0000 (19:32 +0000)
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>
source3/winbindd/winbindd_samr.c

index 6740d11dfb0477301380882d6327239e27d609ae..d4ecb55fce395db78abf9b35c9d97ee453baef38 100644 (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;
                        }