summaryrefslogtreecommitdiff
path: root/source3/rpcclient
diff options
context:
space:
mode:
authorGregor Beck <gbeck@sernet.de>2013-11-01 08:59:53 +0100
committerAndreas Schneider <asn@samba.org>2013-11-04 10:38:51 +0100
commit73062533e0cf5adddafed637327455ae52cab486 (patch)
tree9ebdcfd321d797e6e1fa2666783b8e723d5c7e49 /source3/rpcclient
parent412af28e1e7bb6939b0c6c7fddbc3e992fad4ca1 (diff)
downloadsamba-73062533e0cf5adddafed637327455ae52cab486.tar.gz
s3:rpcclient: fix a leaked talloc_stackframe in cmd_epmapper
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10241 Signed-off-by: Gregor Beck <gbeck@sernet.de> Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source3/rpcclient')
-rw-r--r--source3/rpcclient/cmd_epmapper.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/source3/rpcclient/cmd_epmapper.c b/source3/rpcclient/cmd_epmapper.c
index fc844f9c6c0..68fa701e8be 100644
--- a/source3/rpcclient/cmd_epmapper.c
+++ b/source3/rpcclient/cmd_epmapper.c
@@ -51,7 +51,7 @@ static NTSTATUS cmd_epmapper_map(struct rpc_pipe_client *p,
if (!NT_STATUS_IS_OK(status)) {
d_fprintf(stderr, "dcerpc_binding_build_tower returned %s\n",
nt_errstr(status));
- return status;
+ goto done;
}
ZERO_STRUCT(towers);
@@ -64,13 +64,14 @@ static NTSTATUS cmd_epmapper_map(struct rpc_pipe_client *p,
if (!NT_STATUS_IS_OK(status)) {
d_fprintf(stderr, "dcerpc_epm_Map returned %s\n",
nt_errstr(status));
- return status;
+ goto done;
}
if (result != EPMAPPER_STATUS_OK) {
d_fprintf(stderr, "epm_Map returned %u (0x%08X)\n",
result, result);
- return NT_STATUS_UNSUCCESSFUL;
+ status = NT_STATUS_UNSUCCESSFUL;
+ goto done;
}
d_printf("num_tower[%u]\n", num_towers);
@@ -91,8 +92,9 @@ static NTSTATUS cmd_epmapper_map(struct rpc_pipe_client *p,
d_printf("tower[%u] %s\n", i, dcerpc_binding_string(tmp_ctx, binding));
}
-
- return NT_STATUS_OK;
+done:
+ TALLOC_FREE(tmp_ctx);
+ return status;
}
static NTSTATUS cmd_epmapper_lookup(struct rpc_pipe_client *p,