if (!NT_STATUS_IS_OK(status)) {
continue;
}
- ok = convert_ss2service(return_iplist,
- ss_list,
- return_count);
- if (!ok) {
- status = NT_STATUS_NO_MEMORY;
- goto fail;
- }
goto done;
} else if(strequal( tok, "kdc")) {
/* deal with KDC_NAME_TYPE names here.
/* Ensure we don't namecache
* this with the KDC port. */
name_type = KDC_NAME_TYPE;
- ok = convert_ss2service(return_iplist,
- ss_list,
- return_count);
- if (!ok) {
- status = NT_STATUS_NO_MEMORY;
- }
goto done;
} else if(strequal( tok, "ads")) {
/* deal with 0x1c and 0x1b names here.
if (!NT_STATUS_IS_OK(status)) {
continue;
}
- ok = convert_ss2service(return_iplist,
- ss_list,
- return_count);
- if (!ok) {
- status = NT_STATUS_NO_MEMORY;
- }
goto done;
} else if (strequal(tok, "lmhosts")) {
status = resolve_lmhosts_file_as_sockaddr(
if (!NT_STATUS_IS_OK(status)) {
continue;
}
- ok = convert_ss2service(return_iplist,
- ss_list,
- return_count);
- if (!ok) {
- status = NT_STATUS_NO_MEMORY;
- goto fail;
- }
goto done;
} else if (strequal(tok, "wins")) {
/* don't resolve 1D via WINS */
if (!NT_STATUS_IS_OK(status)) {
continue;
}
- ok = convert_ss2service(return_iplist,
- ss_list,
- return_count);
- if (!ok) {
- status = NT_STATUS_NO_MEMORY;
- goto fail;
- }
goto done;
} else if (strequal(tok, "bcast")) {
status = name_resolve_bcast(
if (!NT_STATUS_IS_OK(status)) {
continue;
}
- ok = convert_ss2service(return_iplist,
- ss_list,
- return_count);
- if (!ok) {
- status = NT_STATUS_NO_MEMORY;
- goto fail;
- }
goto done;
} else {
DBG_ERR("unknown name switch type %s\n",
/* All of the resolve_* functions above have returned false. */
- fail:
-
TALLOC_FREE(frame);
SAFE_FREE(*return_iplist);
*return_count = 0;
done:
+ ok = convert_ss2service(return_iplist, ss_list, return_count);
+ if (!ok) {
+ TALLOC_FREE(frame);
+ SAFE_FREE(*return_iplist);
+ *return_count = 0;
+ return NT_STATUS_NO_MEMORY;
+ }
+
/* Remove duplicate entries. Some queries, notably #1c (domain
controllers) return the PDC in iplist[0] and then all domain
controllers including the PDC in iplist[1..n]. Iterating over