svn commit: samba r14226 - branches/SAMBA_3_0/source/rpc_server trunk/source/rpc_server

vlendec at samba.org vlendec at samba.org
Sun Mar 12 00:03:00 GMT 2006


Author: vlendec
Date: 2006-03-12 00:03:00 +0000 (Sun, 12 Mar 2006)
New Revision: 14226

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

Log:
Fix Coverity bug # 109
Modified:
   branches/SAMBA_3_0/source/rpc_server/srv_reg_nt.c
   trunk/source/rpc_server/srv_reg_nt.c


Changeset:
Modified: branches/SAMBA_3_0/source/rpc_server/srv_reg_nt.c
===================================================================
--- branches/SAMBA_3_0/source/rpc_server/srv_reg_nt.c	2006-03-11 23:58:18 UTC (rev 14225)
+++ branches/SAMBA_3_0/source/rpc_server/srv_reg_nt.c	2006-03-12 00:03:00 UTC (rev 14226)
@@ -835,8 +835,10 @@
 	/* get the rootkey from the regf file and then load the tree
 	   via recursive calls */
 	   
-	if ( !(rootkey = regfio_rootkey( regfile )) )
+	if ( !(rootkey = regfio_rootkey( regfile )) ) {
+		regfio_close( regfile );
 		return WERR_REG_FILE_INVALID;
+	}
 	
 	result = reg_load_tree( regfile, krecord->name, rootkey );
 		

Modified: trunk/source/rpc_server/srv_reg_nt.c
===================================================================
--- trunk/source/rpc_server/srv_reg_nt.c	2006-03-11 23:58:18 UTC (rev 14225)
+++ trunk/source/rpc_server/srv_reg_nt.c	2006-03-12 00:03:00 UTC (rev 14226)
@@ -835,8 +835,10 @@
 	/* get the rootkey from the regf file and then load the tree
 	   via recursive calls */
 	   
-	if ( !(rootkey = regfio_rootkey( regfile )) )
+	if ( !(rootkey = regfio_rootkey( regfile )) ) {
+		regfio_close( regfile );
 		return WERR_REG_FILE_INVALID;
+	}
 	
 	result = reg_load_tree( regfile, krecord->name, rootkey );
 		



More information about the samba-cvs mailing list