summaryrefslogtreecommitdiff
path: root/source3/rpcclient
diff options
context:
space:
mode:
Diffstat (limited to 'source3/rpcclient')
-rw-r--r--source3/rpcclient/cmd_drsuapi.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source3/rpcclient/cmd_drsuapi.c b/source3/rpcclient/cmd_drsuapi.c
index f625aa6300..6c8fe3df49 100644
--- a/source3/rpcclient/cmd_drsuapi.c
+++ b/source3/rpcclient/cmd_drsuapi.c
@@ -74,11 +74,12 @@ static WERROR cmd_drsuapi_cracknames(struct rpc_pipe_client *cli,
&werr);
if (!NT_STATUS_IS_OK(status)) {
- return ntstatus_to_werror(status);
+ werr = ntstatus_to_werror(status);
+ goto out;
}
if (!W_ERROR_IS_OK(werr)) {
- return werr;
+ goto out;
}
for (i=0; i < ctr.ctr1->count; i++) {
@@ -90,6 +91,11 @@ static WERROR cmd_drsuapi_cracknames(struct rpc_pipe_client *cli,
ctr.ctr1->array[i].result_name);
}
+ out:
+ if (is_valid_policy_hnd(&bind_handle)) {
+ rpccli_drsuapi_DsUnbind(cli, mem_ctx, &bind_handle, &werr);
+ }
+
return werr;
}