ole32: Fix a memory leak.
This commit is contained in:
parent
38649f2060
commit
76f9d93344
|
@ -9183,7 +9183,10 @@ static HRESULT STREAM_ReadString( IStream *stm, LPWSTR *string )
|
||||||
count = 0;
|
count = 0;
|
||||||
r = IStream_Read( stm, str, len, &count );
|
r = IStream_Read( stm, str, len, &count );
|
||||||
if( FAILED( r ) )
|
if( FAILED( r ) )
|
||||||
|
{
|
||||||
|
CoTaskMemFree( str );
|
||||||
return r;
|
return r;
|
||||||
|
}
|
||||||
if( count != len )
|
if( count != len )
|
||||||
{
|
{
|
||||||
CoTaskMemFree( str );
|
CoTaskMemFree( str );
|
||||||
|
|
Loading…
Reference in New Issue