svn commit: samba r23462 - in branches/SAMBA_3_0_26/source/registry: .

obnox at samba.org obnox at samba.org
Wed Jun 13 10:32:59 GMT 2007


Author: obnox
Date: 2007-06-13 10:32:57 +0000 (Wed, 13 Jun 2007)
New Revision: 23462

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

Log:
Merge r20209 from 3_0:

Fix two memleaks.


Modified:
   branches/SAMBA_3_0_26/source/registry/reg_eventlog.c


Changeset:
Modified: branches/SAMBA_3_0_26/source/registry/reg_eventlog.c
===================================================================
--- branches/SAMBA_3_0_26/source/registry/reg_eventlog.c	2007-06-13 10:15:48 UTC (rev 23461)
+++ branches/SAMBA_3_0_26/source/registry/reg_eventlog.c	2007-06-13 10:32:57 UTC (rev 23462)
@@ -48,8 +48,10 @@
 		}
 		regdb_fetch_keys( KEY_EVENTLOG, subkeys );
 		regsubkey_ctr_addkey( subkeys, *elogs );
-		if ( !regdb_store_keys( KEY_EVENTLOG, subkeys ) )
+		if ( !regdb_store_keys( KEY_EVENTLOG, subkeys ) ) {
+			TALLOC_FREE(subkeys);
 			return False;
+		}
 		TALLOC_FREE( subkeys );
 
 		/* add in the key of form KEY_EVENTLOG/Application */
@@ -70,8 +72,10 @@
 		regdb_fetch_keys( evtlogpath, subkeys );
 		regsubkey_ctr_addkey( subkeys, *elogs );
 
-		if ( !regdb_store_keys( evtlogpath, subkeys ) )
+		if ( !regdb_store_keys( evtlogpath, subkeys ) ) {
+			TALLOC_FREE(subkeys);
 			return False;
+		}
 		TALLOC_FREE( subkeys );
 
 		/* now add the values to the KEY_EVENTLOG/Application form key */
@@ -287,8 +291,7 @@
 			 sourcename ) );
 	}
 	TALLOC_FREE( values );
-	if ( wrklist )
-		TALLOC_FREE( wrklist );	/*  */
+	TALLOC_FREE( wrklist );	/*  */
 
 	if ( !( subkeys = TALLOC_ZERO_P( NULL, REGSUBKEY_CTR ) ) ) {
 		DEBUG( 0, ( "talloc() failure!\n" ) );



More information about the samba-cvs mailing list