ole32: Fix a memory leak.

This commit is contained in:
Dmitry Timoshkov 2015-07-13 14:31:45 +08:00 committed by Alexandre Julliard
parent 38649f2060
commit 76f9d93344
1 changed files with 3 additions and 0 deletions

View File

@ -9183,7 +9183,10 @@ static HRESULT STREAM_ReadString( IStream *stm, LPWSTR *string )
count = 0;
r = IStream_Read( stm, str, len, &count );
if( FAILED( r ) )
{
CoTaskMemFree( str );
return r;
}
if( count != len )
{
CoTaskMemFree( str );