summaryrefslogtreecommitdiff
path: root/source/nmbd/nmbd_subnetdb.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/nmbd/nmbd_subnetdb.c')
-rw-r--r--source/nmbd/nmbd_subnetdb.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/nmbd/nmbd_subnetdb.c b/source/nmbd/nmbd_subnetdb.c
index c3640028d27..5a93d8bec03 100644
--- a/source/nmbd/nmbd_subnetdb.c
+++ b/source/nmbd/nmbd_subnetdb.c
@@ -220,7 +220,13 @@ BOOL create_subnets(void)
if (lp_we_are_a_wins_server()) {
/* Pick the first interface ip address as the WINS server ip. */
- unicast_ip = *iface_n_ip(0);
+ struct in_addr *nip = iface_n_ip(0);
+
+ if (!nip) {
+ return False;
+ }
+
+ unicast_ip = *nip;
} else {
/* note that we do not set the wins server IP here. We just
set it at zero and let the wins registration code cope