rpcrt4: Handle exit path where bind not allocated yet.
diff --git a/dlls/rpcrt4/rpc_binding.c b/dlls/rpcrt4/rpc_binding.c
index d670a88..87ac413 100644
--- a/dlls/rpcrt4/rpc_binding.c
+++ b/dlls/rpcrt4/rpc_binding.c
@@ -725,8 +725,8 @@
if (ret == RPC_S_OK)
ret = RPCRT4_CreateBindingA(&bind, FALSE, (char*)Protseq);
- if (ret == RPC_S_OK)
- ret = RPCRT4_SetBindingObject(bind, &Uuid);
+ 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);
@@ -764,8 +764,8 @@
if (ret == RPC_S_OK)
ret = RPCRT4_CreateBindingW(&bind, FALSE, Protseq);
- if (ret == RPC_S_OK)
- ret = RPCRT4_SetBindingObject(bind, &Uuid);
+ if (ret != RPC_S_OK) return ret;
+ ret = RPCRT4_SetBindingObject(bind, &Uuid);
if (ret == RPC_S_OK)
ret = RPCRT4_CompleteBindingW(bind, NetworkAddr, Endpoint, Options);