From 8e178b2d4f250f248965d9054c28725111cd337b Mon Sep 17 00:00:00 2001 From: Rob Shearman Date: Wed, 15 Nov 2006 01:00:01 +0000 Subject: [PATCH] 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. --- dlls/rpcrt4/rpc_binding.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/dlls/rpcrt4/rpc_binding.c b/dlls/rpcrt4/rpc_binding.c index 21d78c555e6..c8368ff8631 100644 --- a/dlls/rpcrt4/rpc_binding.c +++ b/dlls/rpcrt4/rpc_binding.c @@ -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) {