summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-06-28 00:01:28 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:19:01 -0500
commit9a7adde8a37a5593e8fbb2bdfd5003c837d568ed (patch)
tree1cb1e94870f8cf3ecd8a906b12a18a408cc28e70 /source3
parent98118545c19ea4236dff9a2ec002efcfe60d81ff (diff)
downloadsamba-9a7adde8a37a5593e8fbb2bdfd5003c837d568ed.tar.gz
samba-9a7adde8a37a5593e8fbb2bdfd5003c837d568ed.tar.bz2
samba-9a7adde8a37a5593e8fbb2bdfd5003c837d568ed.zip
r16576: Fix Klocwork #2015. Possible null deref.
Jeremy. (This used to be commit 9cbfaf62a3c4bb7d2e594e412449506ab0af4063)
Diffstat (limited to 'source3')
-rw-r--r--source3/nmbd/nmbd.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/nmbd/nmbd.c b/source3/nmbd/nmbd.c
index 9c8f99df25..26495d25c1 100644
--- a/source3/nmbd/nmbd.c
+++ b/source3/nmbd/nmbd.c
@@ -173,6 +173,11 @@ static BOOL reload_interfaces(time_t t)
for (n=iface_count() - 1; n >= 0; n--) {
struct interface *iface = get_interface(n);
+ if (!iface) {
+ DEBUG(2,("reload_interfaces: failed to get interface %d\n", n));
+ continue;
+ }
+
/*
* We don't want to add a loopback interface, in case
* someone has added 127.0.0.1 for smbd, nmbd needs to