diff options
| author | Marc Jeanmougin <marc@jeanmougin.fr> | 2019-10-04 16:26:34 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marc@jeanmougin.fr> | 2019-10-05 10:35:21 +0000 |
| commit | 95e00bdf7075329277cac97a6fd0a929c9a8e453 (patch) | |
| tree | ff4521ff8f759eec5aac329efbf00bbca68f0d70 /src/knot-holder-entity.cpp | |
| parent | Fix segfault with bad SVG file. (diff) | |
| download | inkscape-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.cpp | 2 |
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; |
