Kaydet (Commit) 6377907a authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#705773 Resource leak

Change-Id: I630fc03502b7bc510313656ae11ae1159f2319ae
üst 4fe6abdf
...@@ -1194,13 +1194,16 @@ bool SelectionManager::getPasteData( Atom selection, const OUString& rType, Sequ ...@@ -1194,13 +1194,16 @@ bool SelectionManager::getPasteData( Atom selection, const OUString& rType, Sequ
sal_Int32 nOutSize = 0; sal_Int32 nOutSize = 0;
sal_uInt8* pBytes = X11_getBmpFromPixmap( m_pDisplay, aPixmap, aColormap, nOutSize ); sal_uInt8* pBytes = X11_getBmpFromPixmap( m_pDisplay, aPixmap, aColormap, nOutSize );
if( pBytes && nOutSize ) if( pBytes )
{
if( nOutSize )
{ {
rData = Sequence< sal_Int8 >( nOutSize ); rData = Sequence< sal_Int8 >( nOutSize );
memcpy( rData.getArray(), pBytes, nOutSize ); memcpy( rData.getArray(), pBytes, nOutSize );
X11_freeBmp( pBytes );
bSuccess = true; bSuccess = true;
} }
X11_freeBmp( pBytes );
}
} }
} }
} }
......
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