The branch, v3-3-test has been updated
       via  5abbfc9c41d197a57cad6d0272c9c2dfef377f93 (commit)
      from  83f6ef1f5d1d0d86032d00d3337c415be746dda4 (commit)

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


- Log -----------------------------------------------------------------
commit 5abbfc9c41d197a57cad6d0272c9c2dfef377f93
Author: Volker Lendecke <[email protected]>
Date:   Mon Jan 5 13:41:39 2009 +0100

    Fix a bad memleak in vfs_full_audit

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

Summary of changes:
 source/modules/vfs_full_audit.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/modules/vfs_full_audit.c b/source/modules/vfs_full_audit.c
index 5028c62..30da8bd 100644
--- a/source/modules/vfs_full_audit.c
+++ b/source/modules/vfs_full_audit.c
@@ -701,6 +701,7 @@ static int audit_syslog_priority(vfs_handle_struct *handle)
 static char *audit_prefix(TALLOC_CTX *ctx, connection_struct *conn)
 {
        char *prefix = NULL;
+       char *result;
 
        prefix = talloc_strdup(ctx,
                        lp_parm_const_string(SNUM(conn), "full_audit",
@@ -708,7 +709,7 @@ static char *audit_prefix(TALLOC_CTX *ctx, 
connection_struct *conn)
        if (!prefix) {
                return NULL;
        }
-       return talloc_sub_advanced(ctx,
+       result = talloc_sub_advanced(ctx,
                        lp_servicename(SNUM(conn)),
                        conn->server_info->unix_name,
                        conn->connectpath,
@@ -716,6 +717,8 @@ static char *audit_prefix(TALLOC_CTX *ctx, 
connection_struct *conn)
                        conn->server_info->sanitized_username,
                        pdb_get_domain(conn->server_info->sam_account),
                        prefix);
+       TALLOC_FREE(prefix);
+       return result;
 }
 
 static bool log_success(vfs_handle_struct *handle, vfs_op_type op)


-- 
Samba Shared Repository

Reply via email to