summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/namequery.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c
index faa2a09007..8927522090 100644
--- a/source3/libsmb/namequery.c
+++ b/source3/libsmb/namequery.c
@@ -451,6 +451,8 @@ BOOL resolve_name(char *name, struct in_addr *return_ip)
pstrcpy(name_resolve_list, lp_name_resolve_order());
ptr = name_resolve_list;
+ if (!ptr || !*ptr) ptr = "host";
+
while (next_token(&ptr, tok, LIST_SEP)) {
if(strequal(tok, "host") || strequal(tok, "hosts")) {