svn commit: samba r16578 - in trunk/source/nmbd: .
jra at samba.org
jra at samba.org
Wed Jun 28 00:05:49 GMT 2006
Author: jra
Date: 2006-06-28 00:05:48 +0000 (Wed, 28 Jun 2006)
New Revision: 16578
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=16578
Log:
Fix Klocwork #2016. Possible null deref.
Jeremy.
Modified:
trunk/source/nmbd/nmbd_serverlistdb.c
Changeset:
Modified: trunk/source/nmbd/nmbd_serverlistdb.c
===================================================================
--- trunk/source/nmbd/nmbd_serverlistdb.c 2006-06-28 00:01:43 UTC (rev 16577)
+++ trunk/source/nmbd/nmbd_serverlistdb.c 2006-06-28 00:05:48 UTC (rev 16578)
@@ -214,7 +214,7 @@
struct work_record *iwork;
/* Go through all the subnets we have already seen. */
- for (ssub = FIRST_SUBNET; ssub != subrec; ssub = NEXT_SUBNET_INCLUDING_UNICAST(ssub)) {
+ for (ssub = FIRST_SUBNET; ssub && (ssub != subrec); ssub = NEXT_SUBNET_INCLUDING_UNICAST(ssub)) {
for(iwork = ssub->workgrouplist; iwork; iwork = iwork->next) {
if(find_server_in_workgroup( iwork, servrec->serv.name) != NULL) {
/*
More information about the samba-cvs
mailing list