1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-03 12:58:35 +03:00

rpcclient: call drsuapi_DsUnbind() when finished with DsCrackNames call.

Guenther
(This used to be commit d70376fc4faaf9a55337c57035e42afa6a007d1a)
This commit is contained in:
Günther Deschner 2008-05-25 01:52:40 +02:00
parent db940dbbbb
commit 6db0efbea0

View File

@ -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;
}