svn commit: samba r17835 - in branches/SAMBA_3_0/source: libaddns smbd

vlendec at samba.org vlendec at samba.org
Fri Aug 25 18:24:43 GMT 2006


Author: vlendec
Date: 2006-08-25 18:24:43 +0000 (Fri, 25 Aug 2006)
New Revision: 17835

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

Log:
Fix Coverity bugs 306, 309, 310.

Jeremy, you might want to look at the trans2 one.

Volker
Modified:
   branches/SAMBA_3_0/source/libaddns/dnssock.c
   branches/SAMBA_3_0/source/libaddns/dnsupdate.c
   branches/SAMBA_3_0/source/smbd/trans2.c


Changeset:
Modified: branches/SAMBA_3_0/source/libaddns/dnssock.c
===================================================================
--- branches/SAMBA_3_0/source/libaddns/dnssock.c	2006-08-25 16:25:09 UTC (rev 17834)
+++ branches/SAMBA_3_0/source/libaddns/dnssock.c	2006-08-25 18:24:43 UTC (rev 17835)
@@ -732,7 +732,7 @@
 
 	pSendBufferContext = ( DNS_SENDBUFFER_CONTEXT * ) hSendBuffer;
 
-	if ( pSendBufferContext->pSendBuffer ) {
+	if ( pSendBufferContext && pSendBufferContext->pSendBuffer ) {
 		DNSFreeMemory( pSendBufferContext->pSendBuffer );
 	}
 	if ( pSendBufferContext ) {

Modified: branches/SAMBA_3_0/source/libaddns/dnsupdate.c
===================================================================
--- branches/SAMBA_3_0/source/libaddns/dnsupdate.c	2006-08-25 16:25:09 UTC (rev 17834)
+++ branches/SAMBA_3_0/source/libaddns/dnsupdate.c	2006-08-25 18:24:43 UTC (rev 17835)
@@ -431,7 +431,6 @@
 {
 	int32 dwError = 0;
 	int32 dwMinorStatus = 0;
-	HANDLE hSendBuffer = ( HANDLE ) NULL;
 	uint8 *pMessageBuffer = NULL;
 	int32 dwMessageSize = 0;
 	int32 dwMaxSignatureSize = 0;
@@ -477,10 +476,6 @@
 
       error:
 
-	if ( hSendBuffer ) {
-		DNSFreeSendBufferContext( hSendBuffer );
-	}
-
 	if ( pMessageBuffer ) {
 		DNSFreeMemory( pMessageBuffer );
 	}

Modified: branches/SAMBA_3_0/source/smbd/trans2.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/trans2.c	2006-08-25 16:25:09 UTC (rev 17834)
+++ branches/SAMBA_3_0/source/smbd/trans2.c	2006-08-25 18:24:43 UTC (rev 17835)
@@ -3085,7 +3085,7 @@
 		files_struct *fsp1 = file_find_di_first(sbuf.st_dev, sbuf.st_ino);
 		if (fsp1 && fsp1->pending_modtime) {
 			/* the pending modtime overrides the current modtime */
-			mtime_ts.tv_sec = fsp->pending_modtime;
+			mtime_ts.tv_sec = fsp1->pending_modtime;
 			mtime_ts.tv_nsec = 0;
 		}
 		if (fsp1 && fsp1->initial_allocation_size) {



More information about the samba-cvs mailing list