diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2012-07-18 05:03:31 +0930 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2012-07-18 05:03:31 +0930 |
commit | bdc59fb538345d9571554dfef79469fa2c325c90 (patch) | |
tree | aa6afc7b5674c74a1db3e8cf5f41a4fc1f708a74 /source3 | |
parent | a620fc0372a8c493c8d4800acc42cc630acebcb4 (diff) | |
download | samba-bdc59fb538345d9571554dfef79469fa2c325c90.tar.gz samba-bdc59fb538345d9571554dfef79469fa2c325c90.tar.bz2 samba-bdc59fb538345d9571554dfef79469fa2c325c90.zip |
source3/modules/vfs_xattr_tdb.c: fix stackframe leak
xattr_tdb_getxattr() doesn't free its stackframe.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'source3')
-rw-r--r-- | source3/modules/vfs_xattr_tdb.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/modules/vfs_xattr_tdb.c b/source3/modules/vfs_xattr_tdb.c index 859e06b860..0352539e8c 100644 --- a/source3/modules/vfs_xattr_tdb.c +++ b/source3/modules/vfs_xattr_tdb.c @@ -38,7 +38,8 @@ static ssize_t xattr_tdb_getxattr(struct vfs_handle_struct *handle, DATA_BLOB blob; TALLOC_CTX *frame = talloc_stackframe(); - SMB_VFS_HANDLE_GET_DATA(handle, db, struct db_context, return -1); + SMB_VFS_HANDLE_GET_DATA(handle, db, struct db_context, + TALLOC_FREE(frame); return -1); if (vfs_stat_smb_fname(handle->conn, path, &sbuf) == -1) { TALLOC_FREE(frame); @@ -58,6 +59,7 @@ static ssize_t xattr_tdb_getxattr(struct vfs_handle_struct *handle, return -1; } memcpy(value, blob.data, xattr_size); + TALLOC_FREE(frame); return xattr_size; } |