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 <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
This commit is contained in:
Mark Wielaard
2013-07-07 22:09:37 +02:00
committed by David Tardon
parent 3f1a58884e
commit cb14b1e56d

View File

@@ -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)