From 95e00bdf7075329277cac97a6fd0a929c9a8e453 Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Fri, 4 Oct 2019 18:26:34 +0200 Subject: Fix some memory leaks found by scan-build --- src/knot-holder-entity.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/knot-holder-entity.cpp') 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(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 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; -- cgit v1.2.3