summaryrefslogtreecommitdiff
path: root/javaunohelper/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-11-11 17:37:29 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-11-11 17:37:29 +0000
commite08fbe4c592b25fb88828157ff054431ac8e2d8b (patch)
tree4efef3cf1ba04ca336ee97ee6437e522c210b2e1 /javaunohelper/source
parent2d0341a23f95e322990006d78d3f514a9448ed84 (diff)
coverity#1338592 Explicit null dereferenced
Change-Id: Ief5c2effbddebe29fc7a4d38ed0af4fed72de40e
Diffstat (limited to 'javaunohelper/source')
-rw-r--r--javaunohelper/source/javaunohelper.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/javaunohelper/source/javaunohelper.cxx b/javaunohelper/source/javaunohelper.cxx
index d4a9722b382f..83c9643c3d4d 100644
--- a/javaunohelper/source/javaunohelper.cxx
+++ b/javaunohelper/source/javaunohelper.cxx
@@ -69,8 +69,6 @@ jboolean Java_com_sun_star_comp_helper_SharedLibraryLoader_component_1writeInfo(
osl::Module lib(aLibName, SAL_LOADMODULE_LAZY | SAL_LOADMODULE_GLOBAL);
if (lib.is())
{
- lib.release();
-
// ========================= LATEST VERSION =========================
oslGenericFunction pSym = lib.getFunctionSymbol(COMPONENT_GETENV);
if (pSym)
@@ -124,6 +122,7 @@ jboolean Java_com_sun_star_comp_helper_SharedLibraryLoader_component_1writeInfo(
}
}
}
+ lib.release();
}
#endif
return bRet ? JNI_TRUE : JNI_FALSE;
@@ -159,8 +158,6 @@ jobject Java_com_sun_star_comp_helper_SharedLibraryLoader_component_1getFactory(
osl::Module lib(aLibName, SAL_LOADMODULE_LAZY | SAL_LOADMODULE_GLOBAL);
if (lib.is())
{
- lib.release();
-
// ========================= LATEST VERSION =========================
oslGenericFunction pSym = lib.getFunctionSymbol(COMPONENT_GETENV);
if (pSym)
@@ -228,6 +225,7 @@ jobject Java_com_sun_star_comp_helper_SharedLibraryLoader_component_1getFactory(
}
}
}
+ lib.release();
}
#endif
return joSLL_cpp;