About coverity 705665 (javaunohelper.cxx)

Michael Meeks michael.meeks at suse.com
Tue Mar 12 12:28:36 PDT 2013


Hi there,

On Tue, 2013-03-12 at 12:21 -0700, julien2412 wrote:
> 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)

	Unloading modules can be reasonably dangerous, depending on what the
application has done - particularly favourites of registering pointers
to const / static data that are then not cleaned up properly on exiting
are particularly problematic.

	At least on Linux - IIRC there were some libraries that were
deliberately not un-loaded; clearly the intersection of that with Java
may make it even more problematic.

	So - I'd be careful - not every apparent leak is a bug ;-)

	ATB,

		Michael.

-- 
michael.meeks at suse.com  <><, Pseudo Engineer, itinerant idiot



More information about the LibreOffice mailing list