diff options
author | Volker Lendecke <vl@samba.org> | 2009-01-05 13:32:53 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2009-01-05 13:42:26 +0100 |
commit | 3305fa27987d250fe963ae24672dbd8a5b746b7d (patch) | |
tree | 97df845bafaadf4423038c949769d4219cbbca94 | |
parent | 6d4fd789f65ea770a33abfcba42665cf6a0efb10 (diff) | |
download | samba-3305fa27987d250fe963ae24672dbd8a5b746b7d.tar.gz samba-3305fa27987d250fe963ae24672dbd8a5b746b7d.tar.bz2 samba-3305fa27987d250fe963ae24672dbd8a5b746b7d.zip |
Fix a bad memleak in vfs_full_audit
-rw-r--r-- | source3/modules/vfs_full_audit.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c index e4bda09130..666dd59574 100644 --- a/source3/modules/vfs_full_audit.c +++ b/source3/modules/vfs_full_audit.c @@ -721,6 +721,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", @@ -728,7 +729,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, @@ -736,6 +737,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) |