From 9a7adde8a37a5593e8fbb2bdfd5003c837d568ed Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 28 Jun 2006 00:01:28 +0000 Subject: r16576: Fix Klocwork #2015. Possible null deref. Jeremy. (This used to be commit 9cbfaf62a3c4bb7d2e594e412449506ab0af4063) --- source3/nmbd/nmbd.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source3') 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 -- cgit