summaryrefslogtreecommitdiffstats
path: root/src/live_effects/lpe-offset.cpp
diff options
context:
space:
mode:
authorMarc Jeanmougin <marc@jeanmougin.fr>2019-10-04 16:26:34 +0000
committerMarc Jeanmougin <marc@jeanmougin.fr>2019-10-05 10:35:21 +0000
commit95e00bdf7075329277cac97a6fd0a929c9a8e453 (patch)
treeff4521ff8f759eec5aac329efbf00bbca68f0d70 /src/live_effects/lpe-offset.cpp
parentFix segfault with bad SVG file. (diff)
downloadinkscape-95e00bdf7075329277cac97a6fd0a929c9a8e453.tar.gz
inkscape-95e00bdf7075329277cac97a6fd0a929c9a8e453.zip
Fix some memory leaks found by scan-build
Diffstat (limited to 'src/live_effects/lpe-offset.cpp')
-rw-r--r--src/live_effects/lpe-offset.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/live_effects/lpe-offset.cpp b/src/live_effects/lpe-offset.cpp
index 401875700..72d29d0c1 100644
--- a/src/live_effects/lpe-offset.cpp
+++ b/src/live_effects/lpe-offset.cpp
@@ -294,7 +294,6 @@ LPEOffset::doEffect_path(Geom::PathVector const & path_in)
Geom::PathVector ret;
Geom::PathVector open_ret;
Geom::PathVector ret_outline;
- Geom::PathIntersectionGraph *pig;
for (Geom::PathVector::const_iterator path_it = filled_rule_pathv.begin(); path_it != filled_rule_pathv.end(); ++path_it) {
Geom::Path original = (*path_it);
if (original.empty()) {
@@ -430,7 +429,7 @@ LPEOffset::doEffect_path(Geom::PathVector const & path_in)
if (offset < 0) {
sp_flatten(ret_outline, fill_nonZero);
- pig = new Geom::PathIntersectionGraph(ret, ret_outline);
+ std::unique_ptr<Geom::PathIntersectionGraph> pig(new Geom::PathIntersectionGraph(ret, ret_outline));
if (pig && !ret_outline.empty() && !ret.empty()) {
ret = pig->getAminusB();
}