summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-10-11 22:29:43 +1100
committerAndrew Bartlett <abartlet@samba.org>2012-10-11 15:20:54 +0200
commit1ec5486338772cecf953e150ebb717a8845c98d4 (patch)
tree6effe09e9213f277782746fd032f29bbd6d7cb48
parenta11595bd2e6895f734e621c69c1ad0ee3e1a685a (diff)
downloadsamba-1ec5486338772cecf953e150ebb717a8845c98d4.tar.gz
samba-1ec5486338772cecf953e150ebb717a8845c98d4.tar.bz2
samba-1ec5486338772cecf953e150ebb717a8845c98d4.zip
smbd: Always free the talloc_stackframe() before leaving smbd_do_query_security_desc
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Thu Oct 11 15:20:54 CEST 2012 on sn-devel-104
-rw-r--r--source3/smbd/nttrans.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index 1011bd7025..f5e5877d09 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -1916,12 +1916,14 @@ NTSTATUS smbd_do_query_security_desc(connection_struct *conn,
if ((security_info_wanted & SECINFO_SACL) &&
!(fsp->access_mask & SEC_FLAG_SYSTEM_SECURITY)) {
DEBUG(10, ("Access to SACL denied.\n"));
+ TALLOC_FREE(frame);
return NT_STATUS_ACCESS_DENIED;
}
if ((security_info_wanted & (SECINFO_DACL|SECINFO_OWNER|SECINFO_GROUP)) &&
!(fsp->access_mask & SEC_STD_READ_CONTROL)) {
DEBUG(10, ("Access to DACL, OWNER, or GROUP denied.\n"));
+ TALLOC_FREE(frame);
return NT_STATUS_ACCESS_DENIED;
}
@@ -1942,6 +1944,7 @@ NTSTATUS smbd_do_query_security_desc(connection_struct *conn,
fsp, security_info_wanted, frame, &psd);
}
if (!NT_STATUS_IS_OK(status)) {
+ TALLOC_FREE(frame);
return status;
}