diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-12-30 10:22:07 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-01-01 13:37:07 +0100 |
commit | 3dbe07b932d8374d3adf7267a6c21c187c419845 (patch) | |
tree | ce72b5384db8985f84c55cd4131543194f76e4a1 /vcl/source | |
parent | 4cbdae1bd1002fe05fb56dca91134bd161cec081 (diff) |
ofz#29096 Direct-leak
Change-Id: I44d66f708ac49d61296079c1e0591624d47535bf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108500
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/gdi/region.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vcl/source/gdi/region.cxx b/vcl/source/gdi/region.cxx index 671a80b4807c..2a03a3d3beb4 100644 --- a/vcl/source/gdi/region.cxx +++ b/vcl/source/gdi/region.cxx @@ -1565,9 +1565,9 @@ SvStream& ReadRegion(SvStream& rIStrm, vcl::Region& rRegion) if (bHasPolyPolygon) { - tools::PolyPolygon* pNewPoly = new tools::PolyPolygon(); - ReadPolyPolygon( rIStrm, *pNewPoly ); - rRegion.mpPolyPolygon.reset(pNewPoly); + std::shared_ptr<tools::PolyPolygon> xNewPoly = std::make_shared<tools::PolyPolygon>(); + ReadPolyPolygon(rIStrm, *xNewPoly); + rRegion.mpPolyPolygon = xNewPoly; } } |