Kaydet (Commit) cb14b1e5 authored tarafından Mark Wielaard's avatar Mark Wielaard Kaydeden (comit) David Tardon

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/4821Reviewed-by: 's avatarDavid Tardon <dtardon@redhat.com>
Tested-by: 's avatarDavid Tardon <dtardon@redhat.com>
üst 3f1a5888
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment