ok = sockaddr_storage_to_samba_sockaddr(&sa, pss);
if (!ok) {
+ TALLOC_FREE(kdc_str);
goto out;
}
if (!NT_STATUS_IS_OK(status)) {
DBG_ERR("get_kdc_list_talloc fail %s\n",
nt_errstr(status));
+ TALLOC_FREE(kdc_str);
goto out;
}
DBG_DEBUG("got %zu addresses from site %s search\n",
if (!NT_STATUS_IS_OK(status)) {
DBG_ERR("get_kdc_list_talloc (site-less) fail %s\n",
nt_errstr(status));
+ TALLOC_FREE(kdc_str);
goto out;
}
DBG_DEBUG("got %zu addresses from site-less search\n", count_nonsite);
if (count_site + count_nonsite < count_site) {
/* Wrap check. */
DBG_ERR("get_kdc_list_talloc (site-less) fail wrap error\n");
+ TALLOC_FREE(kdc_str);
goto out;
}
dc_addrs = talloc_array(talloc_tos(), struct sockaddr_storage,
count_site + count_nonsite);
if (dc_addrs == NULL) {
+ TALLOC_FREE(kdc_str);
goto out;
}
ok = sockaddr_storage_to_samba_sockaddr(&ip_sa,
&ip_srv_site[i].ss);
if (!ok) {
+ TALLOC_FREE(kdc_str);
goto out;
}
ok = sockaddr_storage_to_samba_sockaddr(&ip_sa,
&ip_srv_nonsite[i].ss);
if (!ok) {
+ TALLOC_FREE(kdc_str);
goto out;
}
DBG_DEBUG("%zu additional KDCs to test\n", num_dcs);
if (num_dcs == 0) {
+ TALLOC_FREE(kdc_str);
goto out;
}
if (dc_addrs2 == NULL) {
+ TALLOC_FREE(kdc_str);
goto out;
}
status = map_nt_error_from_unix(errno);
DEBUG(2,("Failed to create tsocket_address for %s - %s\n",
addr, nt_errstr(status)));
+ TALLOC_FREE(kdc_str);
goto out;
}
}
if (!NT_STATUS_IS_OK(status)) {
DEBUG(10,("get_kdc_ip_string: cldap_multi_netlogon failed: "
"%s\n", nt_errstr(status)));
+ TALLOC_FREE(kdc_str);
goto out;
}
new_kdc_str = talloc_asprintf(mem_ctx, "%s\t\tkdc = %s\n",
kdc_str,
print_canonical_sockaddr_with_port(mem_ctx, &dc_addrs[i]));
+ TALLOC_FREE(kdc_str);
if (new_kdc_str == NULL) {
goto out;
}
- TALLOC_FREE(kdc_str);
kdc_str = new_kdc_str;
}