From 48cc8d24e8130d6cec0468692cbd3cfb90e6c66e Mon Sep 17 00:00:00 2001 From: Kris De Gussem Date: Wed, 3 Oct 2012 20:57:47 +0200 Subject: fixing memory release issue (valgrind reported; bug #1043571 , comment 16 issue 2) (bzr r11731) --- src/display/nr-style.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/display/nr-style.cpp b/src/display/nr-style.cpp index 86102f9e8..ba2340074 100644 --- a/src/display/nr-style.cpp +++ b/src/display/nr-style.cpp @@ -60,7 +60,9 @@ NRStyle::~NRStyle() { if (fill_pattern) cairo_pattern_destroy(fill_pattern); if (stroke_pattern) cairo_pattern_destroy(stroke_pattern); - if (dash) delete dash; + if (dash){ + delete [] dash; + } } void NRStyle::set(SPStyle *style) @@ -126,7 +128,9 @@ void NRStyle::set(SPStyle *style) } miter_limit = style->stroke_miterlimit.value; - if (dash) delete [] dash; + if (dash){ + delete [] dash; + } n_dash = style->stroke_dash.n_dash; if (n_dash != 0) { -- cgit v1.2.3