git.samba.org
/
kai
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6d4fd78
)
Fix a bad memleak in vfs_full_audit
author
Volker Lendecke
<vl@samba.org>
Mon, 5 Jan 2009 12:32:53 +0000
(13:32 +0100)
committer
Volker Lendecke
<vl@samba.org>
Mon, 5 Jan 2009 12:42:26 +0000
(13:42 +0100)
source3/modules/vfs_full_audit.c
patch
|
blob
|
history
diff --git
a/source3/modules/vfs_full_audit.c
b/source3/modules/vfs_full_audit.c
index e4bda09130ff22d45bb37b047f4951f2c209b541..666dd59574752d76e5ed547bdadc767a58b97160 100644
(file)
--- 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;
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",
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;
}
if (!prefix) {
return NULL;
}
- re
turn
talloc_sub_advanced(ctx,
+ re
sult =
talloc_sub_advanced(ctx,
lp_servicename(SNUM(conn)),
conn->server_info->unix_name,
conn->connectpath,
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);
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)
}
static bool log_success(vfs_handle_struct *handle, vfs_op_type op)