summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-05-25 01:52:40 +0200
committerGünther Deschner <gd@samba.org>2008-05-26 12:21:11 +0200
commit6db0efbea075a0cbe660bc6edf6aca384c761a2a (patch)
tree5340cc4fc76fc9d0201d5dcac9e7976a66de3c1f /source3
parentdb940dbbbbe11eac21bb8c85dc1fa88613ed7121 (diff)
downloadsamba-6db0efbea075a0cbe660bc6edf6aca384c761a2a.tar.gz
samba-6db0efbea075a0cbe660bc6edf6aca384c761a2a.tar.bz2
samba-6db0efbea075a0cbe660bc6edf6aca384c761a2a.zip
rpcclient: call drsuapi_DsUnbind() when finished with DsCrackNames call.
Guenther (This used to be commit d70376fc4faaf9a55337c57035e42afa6a007d1a)
Diffstat (limited to 'source3')
-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;
}