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

coverity#705773 Resource leak

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