[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-3171-gb4f01de

Jeremy Allison jra at samba.org
Thu Nov 20 18:55:56 GMT 2008


The branch, v3-2-test has been updated
       via  b4f01de83a6f65e065117e917fdb208ce6d58c01 (commit)
      from  3677b2edd42765e50335cdba1651eebc3518e2ae (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -----------------------------------------------------------------
commit b4f01de83a6f65e065117e917fdb208ce6d58c01
Author: Jeremy Allison <jra at samba.org>
Date:   Thu Nov 20 10:55:23 2008 -0800

    Second part of fix for bug #5891 - smbd crashed when viewing the eventlog exported by "eventlog list". Don't leak memory on error paths.
    Jeremy.

-----------------------------------------------------------------------

Summary of changes:
 source/rpc_server/srv_eventlog_nt.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/rpc_server/srv_eventlog_nt.c b/source/rpc_server/srv_eventlog_nt.c
index 419f406..8e758bb 100644
--- a/source/rpc_server/srv_eventlog_nt.c
+++ b/source/rpc_server/srv_eventlog_nt.c
@@ -434,7 +434,7 @@ static bool sync_eventlog_params( EVENTLOG_INFO *info )
 
 	if ( !info->etdb ) {
 		DEBUG( 4, ( "No open tdb! (%s)\n", info->logname ) );
-		return False;
+		goto done;
 	}
 	/* set resonable defaults.  512Kb on size and 1 week on time */
 
@@ -448,7 +448,7 @@ static bool sync_eventlog_params( EVENTLOG_INFO *info )
 
 	path = talloc_asprintf(ctx, "%s/%s", KEY_EVENTLOG, elogname );
 	if (!path) {
-		return false;
+		goto done;
 	}
 
 	wresult = reg_open_path(ctx, path, REG_KEY_READ, get_root_nt_token(),
@@ -458,14 +458,13 @@ static bool sync_eventlog_params( EVENTLOG_INFO *info )
 		DEBUG( 4,
 		       ( "sync_eventlog_params: Failed to open key [%s] (%s)\n",
 			 path, dos_errstr( wresult ) ) );
-		return false;
+		goto done;
 	}
 
 	wresult = reg_queryvalue(key, key, "Retention", &value);
 	if (!W_ERROR_IS_OK(wresult)) {
 		DEBUG(4, ("Failed to query value \"Retention\": %s\n",
 			  dos_errstr(wresult)));
-		ret = false;
 		goto done;
 	}
 	uiRetention = value->v.dword;
@@ -474,7 +473,6 @@ static bool sync_eventlog_params( EVENTLOG_INFO *info )
 	if (!W_ERROR_IS_OK(wresult)) {
 		DEBUG(4, ("Failed to query value \"MaxSize\": %s\n",
 			  dos_errstr(wresult)));
-		ret = false;
 		goto done;
 	}
 	uiMaxSize = value->v.dword;


-- 
Samba Shared Repository


More information about the samba-cvs mailing list