mirror of
https://github.com/reactos/wine.git
synced 2024-11-24 20:30:01 +00:00
rpcrt4: Reorder code to make sure RpcBindingFromStringBinding[AW] cleans up (coverity).
This commit is contained in:
parent
7c381e59c4
commit
81c0e1eaa1
@ -851,10 +851,16 @@ RPC_STATUS WINAPI RpcBindingFromStringBindingA( RPC_CSTR StringBinding, RPC_BIND
|
||||
|
||||
if (ret == RPC_S_OK)
|
||||
ret = RPCRT4_CreateBindingA(&bind, FALSE, (char*)Protseq);
|
||||
if (ret != RPC_S_OK) return ret;
|
||||
ret = RPCRT4_SetBindingObject(bind, &Uuid);
|
||||
if (ret == RPC_S_OK)
|
||||
ret = RPCRT4_CompleteBindingA(bind, (char*)NetworkAddr, (char*)Endpoint, (char*)Options);
|
||||
if (ret == RPC_S_OK) {
|
||||
ret = RPCRT4_SetBindingObject(bind, &Uuid);
|
||||
if (ret == RPC_S_OK)
|
||||
ret = RPCRT4_CompleteBindingA(bind, (char*)NetworkAddr, (char*)Endpoint, (char*)Options);
|
||||
|
||||
if (ret == RPC_S_OK)
|
||||
*Binding = (RPC_BINDING_HANDLE)bind;
|
||||
else
|
||||
RPCRT4_ReleaseBinding(bind);
|
||||
}
|
||||
|
||||
RpcStringFreeA(&Options);
|
||||
RpcStringFreeA(&Endpoint);
|
||||
@ -862,11 +868,6 @@ RPC_STATUS WINAPI RpcBindingFromStringBindingA( RPC_CSTR StringBinding, RPC_BIND
|
||||
RpcStringFreeA(&Protseq);
|
||||
RpcStringFreeA(&ObjectUuid);
|
||||
|
||||
if (ret == RPC_S_OK)
|
||||
*Binding = (RPC_BINDING_HANDLE)bind;
|
||||
else
|
||||
RPCRT4_ReleaseBinding(bind);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -890,10 +891,16 @@ RPC_STATUS WINAPI RpcBindingFromStringBindingW( RPC_WSTR StringBinding, RPC_BIND
|
||||
|
||||
if (ret == RPC_S_OK)
|
||||
ret = RPCRT4_CreateBindingW(&bind, FALSE, Protseq);
|
||||
if (ret != RPC_S_OK) return ret;
|
||||
ret = RPCRT4_SetBindingObject(bind, &Uuid);
|
||||
if (ret == RPC_S_OK)
|
||||
ret = RPCRT4_CompleteBindingW(bind, NetworkAddr, Endpoint, Options);
|
||||
if (ret == RPC_S_OK) {
|
||||
ret = RPCRT4_SetBindingObject(bind, &Uuid);
|
||||
if (ret == RPC_S_OK)
|
||||
ret = RPCRT4_CompleteBindingW(bind, NetworkAddr, Endpoint, Options);
|
||||
|
||||
if (ret == RPC_S_OK)
|
||||
*Binding = (RPC_BINDING_HANDLE)bind;
|
||||
else
|
||||
RPCRT4_ReleaseBinding(bind);
|
||||
}
|
||||
|
||||
RpcStringFreeW(&Options);
|
||||
RpcStringFreeW(&Endpoint);
|
||||
@ -901,11 +908,6 @@ RPC_STATUS WINAPI RpcBindingFromStringBindingW( RPC_WSTR StringBinding, RPC_BIND
|
||||
RpcStringFreeW(&Protseq);
|
||||
RpcStringFreeW(&ObjectUuid);
|
||||
|
||||
if (ret == RPC_S_OK)
|
||||
*Binding = (RPC_BINDING_HANDLE)bind;
|
||||
else
|
||||
RPCRT4_ReleaseBinding(bind);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user