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

This commit is contained in:
Michael Stefaniuc 2007-09-25 01:15:07 +02:00 committed by Alexandre Julliard
parent ce0e1706fe
commit dbfa8eedf7
1 changed files with 2 additions and 1 deletions

View File

@ -402,9 +402,10 @@ static HRESULT WINAPI CFProxy_CreateInstance(
hGlobal = GlobalAlloc(GMEM_MOVEABLE|GMEM_NODISCARD|GMEM_SHARE,msg.cbBuffer);
memcpy(GlobalLock(hGlobal),msg.Buffer,msg.cbBuffer);
hres = CreateStreamOnHGlobal(hGlobal,TRUE,&pStream);
if (hres) {
if (hres != S_OK) {
FIXME("CreateStreamOnHGlobal failed with %x\n",hres);
IRpcChannelBuffer_FreeBuffer(This->chanbuf,&msg);
GlobalFree(hGlobal);
return hres;
}
hres = IStream_Read(pStream, ppv, sizeof(*ppv), NULL);