summaryrefslogtreecommitdiff
path: root/source3/nmbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-06-28 00:07:53 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:19:01 -0500
commit5a1a08d4286b85252233517373cad75a355b05a7 (patch)
treede5fdc5df385e8c1c2c709e2f6ecadbc4ded87af /source3/nmbd
parentd70803ebe3472cc1930e5732b320d14a47c54d28 (diff)
downloadsamba-5a1a08d4286b85252233517373cad75a355b05a7.tar.gz
samba-5a1a08d4286b85252233517373cad75a355b05a7.tar.bz2
samba-5a1a08d4286b85252233517373cad75a355b05a7.zip
r16581: Fix Klocwork #2017. Possible null deref.
Jeremy. (This used to be commit 6967fd4cefa84a7b7b5e14467bfa8152907d55c9)
Diffstat (limited to 'source3/nmbd')
-rw-r--r--source3/nmbd/nmbd_subnetdb.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/nmbd/nmbd_subnetdb.c b/source3/nmbd/nmbd_subnetdb.c
index 3b9be2c2ce..04df3e9a4f 100644
--- a/source3/nmbd/nmbd_subnetdb.c
+++ b/source3/nmbd/nmbd_subnetdb.c
@@ -203,6 +203,11 @@ BOOL create_subnets(void)
for (i = 0 ; i < num_interfaces; i++) {
struct interface *iface = get_interface(i);
+ if (!iface) {
+ DEBUG(2,("create_subnets: can't get interface %d.\n", i ));
+ continue;
+ }
+
/*
* We don't want to add a loopback interface, in case
* someone has added 127.0.0.1 for smbd, nmbd needs to