Commit 1c2bbe8f authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

ole32: Handle ILockBytes creation failure (PVS-Studio).

parent f597fe8f
......@@ -576,6 +576,12 @@ static HRESULT render_embed_source_hack(IDataObject *data, LPFORMATETC fmt)
hStorage = GlobalAlloc(GMEM_SHARE|GMEM_MOVEABLE, 0);
if (hStorage == NULL) return E_OUTOFMEMORY;
hr = CreateILockBytesOnHGlobal(hStorage, FALSE, &ptrILockBytes);
if (FAILED(hr))
{
GlobalFree(hStorage);
return hr;
}
hr = StgCreateDocfileOnILockBytes(ptrILockBytes, STGM_SHARE_EXCLUSIVE|STGM_READWRITE, 0, &std.u.pstg);
ILockBytes_Release(ptrILockBytes);
......
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