]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: libsmb: Move callers of get_sorted_dc_list() -> get_sorted_dc_list_talloc().
authorJeremy Allison <jra@samba.org>
Wed, 26 Aug 2020 18:53:07 +0000 (11:53 -0700)
committerNoel Power <npower@samba.org>
Mon, 7 Sep 2020 13:23:41 +0000 (13:23 +0000)
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
source3/libsmb/namequery_dc.c

index 96b5f565773971675ea4b1a1773a0ff8c4bbd978..c8a16823673eb173df62318b4167ceb7bfbb7dcf 100644 (file)
@@ -173,8 +173,13 @@ static bool rpc_dc_name(const char *domain,
 
        /* get a list of all domain controllers */
 
-       if (!NT_STATUS_IS_OK(get_sorted_dc_list(domain, NULL, &ip_list, &count,
-                                               False))) {
+       result = get_sorted_dc_list_talloc(talloc_tos(),
+                               domain,
+                               NULL,
+                               &ip_list,
+                               &count,
+                               false);
+       if (!NT_STATUS_IS_OK(result)) {
                DEBUG(3, ("Could not look up dc's for domain %s\n", domain));
                return False;
        }
@@ -194,7 +199,7 @@ static bool rpc_dc_name(const char *domain,
                }
        }
 
-       SAFE_FREE(ip_list);
+       TALLOC_FREE(ip_list);
 
        /* No-one to talk to )-: */
        return False;           /* Boo-hoo */
@@ -210,7 +215,7 @@ static bool rpc_dc_name(const char *domain,
                  addr, domain));
 
        *ss_out = dc_ss;
-       SAFE_FREE(ip_list);
+       TALLOC_FREE(ip_list);
 
        return True;
 }