From bdc59fb538345d9571554dfef79469fa2c325c90 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 18 Jul 2012 05:03:31 +0930 Subject: source3/modules/vfs_xattr_tdb.c: fix stackframe leak xattr_tdb_getxattr() doesn't free its stackframe. Signed-off-by: Rusty Russell --- source3/modules/vfs_xattr_tdb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source3/modules') 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; } -- cgit