]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Revert "winbindd: the ad trusted_domains call should return talloced strings."
authorGünther Deschner <gd@samba.org>
Fri, 5 Sep 2008 21:22:10 +0000 (23:22 +0200)
committerGünther Deschner <gd@samba.org>
Fri, 5 Sep 2008 21:29:54 +0000 (23:29 +0200)
This reverts commit b57cbf62e8180c8fdb8f541c43358d36d8dbbdfa.

source/winbindd/winbindd_ads.c

index c7f730e3974b0f4c8b92e2c8a29ee09e4dea3ca4..894e7866b35d3aa2598bb46fe87b68fa6cb271d3 100644 (file)
@@ -1241,11 +1241,8 @@ static NTSTATUS trusted_domains(struct winbindd_domain *domain,
                                continue;                               
                        }
                        
-                       (*names)[ret_count] = talloc_strdup(mem_ctx, trusts.array[i].netbios_name);
-                       (*alt_names)[ret_count] = talloc_strdup(mem_ctx, trusts.array[i].dns_name);
-                       if ((*names)[ret_count] == NULL) {
-                               return NT_STATUS_NO_MEMORY;
-                       }
+                       (*names)[ret_count] = CONST_DISCARD(char *, trusts.array[i].netbios_name);
+                       (*alt_names)[ret_count] = CONST_DISCARD(char *, trusts.array[i].dns_name);
                        if (trusts.array[i].sid) {
                                sid_copy(&(*dom_sids)[ret_count], trusts.array[i].sid);
                        } else {