diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-10-02 11:15:56 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-10-02 14:49:04 +0100 |
commit | ba8469f6ef8525ea15a5fd749b2389b6853cf1e5 (patch) | |
tree | 01375925163057b66ee4324f37ddcdc9742cb798 /vcl/source | |
parent | 37f62f86aff64b94ca4a8cb34df6cfda216da3bf (diff) |
coverity#1242494 Resource leak
Change-Id: I4956890da9978381e2de7e8b1af37495884d4965
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/app/svapp.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx index 2798d3fdcf3f..fd5806cef057 100644 --- a/vcl/source/app/svapp.cxx +++ b/vcl/source/app/svapp.cxx @@ -1403,13 +1403,12 @@ UnoWrapperBase* Application::GetUnoWrapper( bool bCreateIfNotExist ) if ( !pSVData->mpUnoWrapper && bCreateIfNotExist && !bAlreadyTriedToCreate ) { #ifndef DISABLE_DYNLOADING + osl::Module aTkLib; OUString aLibName(TK_DLL_NAME); - oslModule hTkLib = osl_loadModuleRelative( - &thisModule, aLibName.pData, SAL_LOADMODULE_DEFAULT ); - if ( hTkLib ) + aTkLib.loadRelative(&thisModule, aLibName, SAL_LOADMODULE_DEFAULT); + if (aTkLib.is()) { - OUString aFunctionName( "CreateUnoWrapper" ); - FN_TkCreateUnoWrapper fnCreateWrapper = (FN_TkCreateUnoWrapper)osl_getFunctionSymbol( hTkLib, aFunctionName.pData ); + FN_TkCreateUnoWrapper fnCreateWrapper = (FN_TkCreateUnoWrapper)aTkLib.getFunctionSymbol("CreateUnoWrapper"); if ( fnCreateWrapper ) { pSVData->mpUnoWrapper = fnCreateWrapper(); |