Revert "Fix a memleak caused by a crappy get_sorted_dc_list() API"
authorVolker Lendecke <vl@samba.org>
Tue, 17 Jun 2008 10:15:05 +0000 (12:15 +0200)
committerVolker Lendecke <vl@samba.org>
Tue, 17 Jun 2008 10:15:05 +0000 (12:15 +0200)
This reverts commit ba10b9c077272c521504b3a638bba73446efc61c.

source/winbindd/winbindd_cm.c

index 9bfe1dec86cdd25418c17d5fd36e537ce20bbb24..17bc66ec5d4c86fc71f23fc688c499dbb3ff571e 100644 (file)
@@ -1161,20 +1161,9 @@ static bool get_dcs(TALLOC_CTX *mem_ctx, struct winbindd_domain *domain,
 
                sitename = sitename_fetch(domain->alt_name);
                if (sitename) {
-                       NTSTATUS status;
 
                        /* Do the site-specific AD dns lookup first. */
-                       status = get_sorted_dc_list(domain->alt_name,
-                                                   sitename, &ip_list,
-                                                   &iplist_size, True);
-                       if (!NT_STATUS_IS_OK(status)) {
-                               /*
-                                * Work around a crappy about-to-be-replaced
-                                * get_sorted_dc_list error handling :-)
-                                */
-                               SAFE_FREE(ip_list);
-                               iplist_size = 0;
-                       }
+                       get_sorted_dc_list(domain->alt_name, sitename, &ip_list, &iplist_size, True);
 
                        for ( i=0; i<iplist_size; i++ ) {
                                char addr[INET6_ADDRSTRLEN];
@@ -1207,8 +1196,6 @@ static bool get_dcs(TALLOC_CTX *mem_ctx, struct winbindd_domain *domain,
                                        dcs,
                                        num_dcs);
                }
-               SAFE_FREE(ip_list);
-               iplist_size = 0;
         }
 
        /* try standard netbios queries if no ADS */