ole32: Fail before constructing an object in CreateStreamOnHGlobal to avoid a memory leak.

This commit is contained in:
Rob Shearman 2007-11-12 20:10:32 +00:00 committed by Alexandre Julliard
parent 8296548bb5
commit 4edca3cf4d
1 changed files with 3 additions and 0 deletions

View File

@ -721,6 +721,9 @@ HRESULT WINAPI CreateStreamOnHGlobal(
{
HGLOBALStreamImpl* newStream;
if (!ppstm)
return E_INVALIDARG;
newStream = HGLOBALStreamImpl_Construct(hGlobal,
fDeleteOnRelease);