rpcrt4: Fix a crash in RPCRT4_OpenBinding that can occur if

RPCRT4_CreateConnection fails by checking the return value from the
function and returning in this case.
This commit is contained in:
Rob Shearman 2006-11-15 01:00:01 +00:00 committed by Alexandre Julliard
parent 079b6b074c
commit 8e178b2d4f
1 changed files with 7 additions and 3 deletions

View File

@ -255,9 +255,13 @@ RPC_STATUS RPCRT4_OpenBinding(RpcBinding* Binding, RpcConnection** Connection,
}
/* create a new connection */
RPCRT4_CreateConnection(&NewConnection, Binding->server, Binding->Protseq,
Binding->NetworkAddr, Binding->Endpoint, NULL,
Binding->AuthInfo, Binding);
status = RPCRT4_CreateConnection(&NewConnection, Binding->server,
Binding->Protseq, Binding->NetworkAddr,
Binding->Endpoint, NULL, Binding->AuthInfo,
Binding);
if (status != RPC_S_OK)
return status;
status = RPCRT4_OpenClientConnection(NewConnection);
if (status != RPC_S_OK)
{