vcl/source/gdi/region.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
New commits: commit 3dbe07b932d8374d3adf7267a6c21c187c419845 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed Dec 30 10:22:07 2020 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Fri Jan 1 13:37:07 2021 +0100 ofz#29096 Direct-leak Change-Id: I44d66f708ac49d61296079c1e0591624d47535bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108500 Tested-by: Caolán McNamara <caol...@redhat.com> Reviewed-by: Caolán McNamara <caol...@redhat.com> 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; } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits