Author: jra
Date: 2006-06-28 00:07:48 +0000 (Wed, 28 Jun 2006)
New Revision: 16580

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=16580

Log:
Fix Klocwork #2017. Possible null deref.
Jeremy.

Modified:
   trunk/source/nmbd/nmbd_subnetdb.c


Changeset:
Modified: trunk/source/nmbd/nmbd_subnetdb.c
===================================================================
--- trunk/source/nmbd/nmbd_subnetdb.c   2006-06-28 00:05:53 UTC (rev 16579)
+++ trunk/source/nmbd/nmbd_subnetdb.c   2006-06-28 00:07:48 UTC (rev 16580)
@@ -203,6 +203,11 @@
        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

Reply via email to