From e36987cea4199ec3e51becad59b88e36c75e0955 Mon Sep 17 00:00:00 2001 From: "Liam P. White" Date: Sat, 12 Apr 2014 14:38:11 -0400 Subject: Fix memory leak (bzr r13090.1.53) --- src/live_effects/lpe-taperstroke.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/live_effects/lpe-taperstroke.cpp b/src/live_effects/lpe-taperstroke.cpp index 2400b3e37..8316daf71 100644 --- a/src/live_effects/lpe-taperstroke.cpp +++ b/src/live_effects/lpe-taperstroke.cpp @@ -328,6 +328,7 @@ Geom::PathVector LPETaperStroke::doEffect_simplePath(Geom::PathVector const & pa Geom::Curve * temp; subdivideCurve(curve_start, attach_start - loc, temp, curve_start); trimmed_start.append(*temp); + if (temp) delete temp; temp = 0; //special case: path is one segment long //special case: what if the two knots occupy the same segment? @@ -340,6 +341,7 @@ Geom::PathVector LPETaperStroke::doEffect_simplePath(Geom::PathVector const & pa subdivideCurve(curve_start, t, curve_start, temp); trimmed_end.append(*temp); + if (temp) delete temp; temp = 0; for (unsigned j = (size - attach_end) + 1; j < size; j++) { trimmed_end.append(path_in[0] [j]); @@ -370,6 +372,7 @@ Geom::PathVector LPETaperStroke::doEffect_simplePath(Geom::PathVector const & pa subdivideCurve(curve_end, t, curve_end, temp); trimmed_end.append(*temp); + if (temp) delete temp; temp = 0; for (unsigned j = (size - attach_end) + 1; j < size; j++) { trimmed_end.append(path_in[0] [j]); -- cgit v1.2.3