summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Beck <gbeck@sernet.de>2011-06-14 13:19:59 +0200
committerMichael Adam <obnox@samba.org>2011-10-12 03:49:05 +0200
commit9d688cd7be2d21af1f881a3e65549bff03619c46 (patch)
tree34820442e3f5657de2c820c5f42396beb966fb59
parent858e4cb1b605d37cc5b585d7292049c774f53ceb (diff)
downloadsamba-9d688cd7be2d21af1f881a3e65549bff03619c46.tar.gz
samba-9d688cd7be2d21af1f881a3e65549bff03619c46.tar.bz2
samba-9d688cd7be2d21af1f881a3e65549bff03619c46.zip
s3:smbcacls fix leaking talloc stackframce on tcon failure
Signed-off-by: Michael Adam <obnox@samba.org>
-rw-r--r--source3/utils/smbcacls.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c
index bb7746e6b0..9a6c283630 100644
--- a/source3/utils/smbcacls.c
+++ b/source3/utils/smbcacls.c
@@ -91,7 +91,7 @@ static NTSTATUS cli_lsa_lookup_sid(struct cli_state *cli,
status = cli_tcon_andx(cli, "IPC$", "?????", "", 0);
if (!NT_STATUS_IS_OK(status)) {
- return status;
+ goto tcon_fail;
}
status = cli_rpc_pipe_open_noauth(cli, &ndr_table_lsarpc.syntax_id,
@@ -120,6 +120,7 @@ static NTSTATUS cli_lsa_lookup_sid(struct cli_state *cli,
fail:
TALLOC_FREE(p);
cli_tdis(cli);
+ tcon_fail:
cli_state_set_tid(cli, orig_cnum);
TALLOC_FREE(frame);
return status;
@@ -140,7 +141,7 @@ static NTSTATUS cli_lsa_lookup_name(struct cli_state *cli,
status = cli_tcon_andx(cli, "IPC$", "?????", "", 0);
if (!NT_STATUS_IS_OK(status)) {
- return status;
+ goto tcon_fail;
}
status = cli_rpc_pipe_open_noauth(cli, &ndr_table_lsarpc.syntax_id,
@@ -168,6 +169,7 @@ static NTSTATUS cli_lsa_lookup_name(struct cli_state *cli,
fail:
TALLOC_FREE(p);
cli_tdis(cli);
+ tcon_fail:
cli_state_set_tid(cli, orig_cnum);
TALLOC_FREE(frame);
return status;