Commit dbfa8eed authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

ole32: Free memory on error path (found by Smatch).

parent ce0e1706
...@@ -402,9 +402,10 @@ static HRESULT WINAPI CFProxy_CreateInstance( ...@@ -402,9 +402,10 @@ static HRESULT WINAPI CFProxy_CreateInstance(
hGlobal = GlobalAlloc(GMEM_MOVEABLE|GMEM_NODISCARD|GMEM_SHARE,msg.cbBuffer); hGlobal = GlobalAlloc(GMEM_MOVEABLE|GMEM_NODISCARD|GMEM_SHARE,msg.cbBuffer);
memcpy(GlobalLock(hGlobal),msg.Buffer,msg.cbBuffer); memcpy(GlobalLock(hGlobal),msg.Buffer,msg.cbBuffer);
hres = CreateStreamOnHGlobal(hGlobal,TRUE,&pStream); hres = CreateStreamOnHGlobal(hGlobal,TRUE,&pStream);
if (hres) { if (hres != S_OK) {
FIXME("CreateStreamOnHGlobal failed with %x\n",hres); FIXME("CreateStreamOnHGlobal failed with %x\n",hres);
IRpcChannelBuffer_FreeBuffer(This->chanbuf,&msg); IRpcChannelBuffer_FreeBuffer(This->chanbuf,&msg);
GlobalFree(hGlobal);
return hres; return hres;
} }
hres = IStream_Read(pStream, ppv, sizeof(*ppv), NULL); hres = IStream_Read(pStream, ppv, sizeof(*ppv), NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment