summaryrefslogtreecommitdiff
path: root/source3/nmbd/nmbd_subnetdb.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/nmbd/nmbd_subnetdb.c')
-rw-r--r--source3/nmbd/nmbd_subnetdb.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source3/nmbd/nmbd_subnetdb.c b/source3/nmbd/nmbd_subnetdb.c
index c3640028d2..5a93d8bec0 100644
--- a/source3/nmbd/nmbd_subnetdb.c
+++ b/source3/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