Kaydet (Commit) 334086d0 authored tarafından Jian Fang Zhang's avatar Jian Fang Zhang Kaydeden (comit) Caolán McNamara

Resolves: #i113605# missing :ReleaseStgMedium() call on STGMEDIUM object

which causes obvious memory leaks

Found by: zhangjf
Patch by: zhangjf
(cherry picked from commit e0d9b7a2)

Change-Id: I5f99f8cf02e155e5284df3df89feb49d9a30c2c1
üst db426786
......@@ -1197,6 +1197,9 @@ awt::Size OleComponent::GetExtent( sal_Int64 nAspect )
OSL_FAIL( "Unexpected size is provided!" );
}
}
// i113605, to release storage medium
if ( SUCCEEDED( hr ) )
::ReleaseStgMedium(&aMedium);
}
}
......@@ -1568,6 +1571,7 @@ uno::Any SAL_CALL OleComponent::getTransferData( const datatransfer::DataFlavor&
if ( SUCCEEDED( hr ) )
{
bSupportedFlavor = m_pNativeImpl->ConvertDataForFlavor( aMedium, aFlavor, aResult );
::ReleaseStgMedium(&aMedium); // i113605, to release storage medium
if ( bSupportedFlavor )
{
// TODO/LATER: bring the optimization back when other aspects are supported
......
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