From c2015d334121729dc01eb1e90c39eb561589ac32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Hentschel?= Date: Wed, 28 Sep 2011 19:58:57 +0200 Subject: [PATCH] ole32: Return if out of memory (Coverity). --- dlls/ole32/rpc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/ole32/rpc.c b/dlls/ole32/rpc.c index 8ac5d2d3e5..35971e0e2b 100644 --- a/dlls/ole32/rpc.c +++ b/dlls/ole32/rpc.c @@ -539,7 +539,10 @@ static HRESULT WINAPI ServerRpcChannelBuffer_GetBuffer(LPRPCCHANNELBUFFER iface, if (msg->Buffer) status = RPC_S_OK; else - status = ERROR_OUTOFMEMORY; + { + HeapFree(GetProcessHeap(), 0, channel_hook_data); + return E_OUTOFMEMORY; + } } else status = I_RpcGetBuffer(msg);