cppcanvas/source/mtfrenderer/emfplus.cxx | 12 ++++++++++++ 1 file changed, 12 insertions(+)
New commits: commit cb14b1e56d2aab70d28afca8bf039a27f89671c8 Author: Mark Wielaard <m...@klomp.org> Date: Sun Jul 7 22:09:37 2013 +0200 Fix memory leak in EMFPPen. Delete dashPattern, compoundArray, customStartCap and customEndCap arrays if they were created in the destructor. Change-Id: I5f3821b1ab0ac31a9cd4bc402c04090585953573 Reviewed-on: https://gerrit.libreoffice.org/4821 Reviewed-by: David Tardon <dtar...@redhat.com> Tested-by: David Tardon <dtar...@redhat.com> diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx index d3b58aa..a8b08d2 100644 --- a/cppcanvas/source/mtfrenderer/emfplus.cxx +++ b/cppcanvas/source/mtfrenderer/emfplus.cxx @@ -604,6 +604,18 @@ namespace cppcanvas public: EMFPPen () : EMFPBrush () { + dashPattern = NULL; + compoundArray = NULL; + customStartCap = NULL; + customEndCap = NULL; + } + + ~EMFPPen () + { + delete[] dashPattern; + delete[] compoundArray; + delete[] customStartCap; + delete[] customEndCap; } void SetStrokeAttributes (rendering::StrokeAttributes& rStrokeAttributes, ImplRenderer& rR, const OutDevState& rState) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits