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

coverity#705707 Resource leak

and

coverity#705706 Resource leak

Change-Id: Ia18954acb430464c94c5dd608abf9d6e8214058a
üst a24ef848
...@@ -487,16 +487,12 @@ IMPL_LINK( SfxApplication, GlobalBasicErrorHdl_Impl, StarBASIC*, pStarBasic ) ...@@ -487,16 +487,12 @@ IMPL_LINK( SfxApplication, GlobalBasicErrorHdl_Impl, StarBASIC*, pStarBasic )
#else #else
#ifndef DISABLE_DYNLOADING #ifndef DISABLE_DYNLOADING
// get basctl dllname // load basctl module
static OUString aLibName( SVLIBRARY( "basctl" ) ); osl::Module aMod;
aMod.loadRelative(&thisModule, SVLIBRARY("basctl"), 0);
// load module
oslModule handleMod = osl_loadModuleRelative(
&thisModule, aLibName.pData, 0 );
// get symbol // get symbol
OUString aSymbol( "basicide_handle_basic_error" ); basicide_handle_basic_error pSymbol = (basicide_handle_basic_error) aMod.getFunctionSymbol("basicide_handle_basic_error");
basicide_handle_basic_error pSymbol = (basicide_handle_basic_error) osl_getFunctionSymbol( handleMod, aSymbol.pData );
// call basicide_handle_basic_error in basctl // call basicide_handle_basic_error in basctl
long nRet = pSymbol ? pSymbol( pStarBasic ) : 0; long nRet = pSymbol ? pSymbol( pStarBasic ) : 0;
...@@ -587,16 +583,12 @@ void SfxApplication::MacroOrganizer( sal_Int16 nTabId ) ...@@ -587,16 +583,12 @@ void SfxApplication::MacroOrganizer( sal_Int16 nTabId )
#else #else
#ifndef DISABLE_DYNLOADING #ifndef DISABLE_DYNLOADING
// get basctl dllname // load basctl module
static OUString aLibName( SVLIBRARY( "basctl" ) ); osl::Module aMod;
aMod.loadRelative(&thisModule, SVLIBRARY("basctl"), 0);
// load module
oslModule handleMod = osl_loadModuleRelative(
&thisModule, aLibName.pData, 0 );
// get symbol // get symbol
OUString aSymbol( "basicide_macro_organizer" ); basicide_macro_organizer pSymbol = (basicide_macro_organizer) aMod.getFunctionSymbol("basicide_macro_organizer");
basicide_macro_organizer pSymbol = (basicide_macro_organizer) osl_getFunctionSymbol( handleMod, aSymbol.pData );
SAL_WARN_IF(!pSymbol, "sfx.doc", "SfxApplication::MacroOrganizer, no symbol!"); SAL_WARN_IF(!pSymbol, "sfx.doc", "SfxApplication::MacroOrganizer, no symbol!");
if (!pSymbol) if (!pSymbol)
......
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