[Libreoffice] [PATCH] Refactor to make cppcheck happy

Michael Meeks michael.meeks at novell.com
Fri Oct 1 07:54:04 PDT 2010

Hi Justin,

On Wed, 2010-09-29 at 17:57 -0700, Justin Malcolm wrote:

> (error) Common realloc mistake: "ptr" nulled but not freed upon
> failure

	Which means if realloc fails we ought to detect that, free (ptr) and
fall-back to some otherworldly case of handling OOM issues perfectly

	The patch just defeats cppcheck I think, rather than making this any
better. Can we turn off this warning ? :-) I'd love to search for any
'realloc moves memory' type mistakes, but in a world of VM over-commit,
it no longer makes sense to write apps that handle OOM for trivial cases
IMHO :-)

> Attached is the corrected patch.

	Brilliant - committed,



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

More information about the LibreOffice mailing list