summaryrefslogtreecommitdiffstats
path: root/src/knot-holder-entity.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/knot-holder-entity.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/knot-holder-entity.cpp')
-rw-r--r--src/knot-holder-entity.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/knot-holder-entity.cpp b/src/knot-holder-entity.cpp
index 19f3b8ef1..8c1327c8b 100644
--- a/src/knot-holder-entity.cpp
+++ b/src/knot-holder-entity.cpp
@@ -387,7 +387,7 @@ void FilterKnotHolderEntity::knot_set(Geom::Point const &p, Geom::Point const &o
SPFilter *filter = (item->style && item->style->filter.href) ? dynamic_cast<SPFilter *>(item->style->getFilter()) : nullptr;
if(!filter) return;
Geom::OptRect orig_bbox = item->visualBounds();
- Geom::Rect *new_bbox = _topleft ? new Geom::Rect(p,orig_bbox->max()) : new Geom::Rect(orig_bbox->min(), p);
+ std::unique_ptr<Geom::Rect> new_bbox(_topleft ? new Geom::Rect(p,orig_bbox->max()) : new Geom::Rect(orig_bbox->min(), p));
if(_topleft) {
float x_a = filter->width.computed;
float y_a = filter->height.computed;