Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hello,

Scan coverity detected this:
leaked_storage: Variable "lib" going out of scope leaks the storage it
points to. line 236
(see
http://opengrok.libreoffice.org/xref/core/javaunohelper/source/javaunohelper.cxx#236)
I just thought adding 
osl_unloadModule(lib) just before line 235, so last line of the block if
(lib)

Now I'm not sure because I don't know at all the mechanism of modules and
wonder if the declaration of "lib" would do the trick:
oslModule lib = osl_loadModule( aLibName.pData, SAL_LOADMODULE_LAZY |
SAL_LOADMODULE_GLOBAL );
Would " SAL_LOADMODULE_LAZY" mean unload "automagically" when necessary for
example?

Julien 



--
View this message in context: 
http://nabble.documentfoundation.org/About-coverity-705665-javaunohelper-cxx-tp4043372.html
Sent from the Dev mailing list archive at Nabble.com.

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.