[Libreoffice-commits] core.git: vcl/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Mon Dec 28 14:44:10 UTC 2020


 vcl/source/gdi/region.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit abe74e2d9fe979a9e7cfe18f582db289d73df8a5
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sun Dec 27 19:58:15 2020 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Dec 28 15:43:26 2020 +0100

    ofz#28984 Direct-leak
    
    Change-Id: Ic60a00a04339659604afdf2fdb15e9a7cc6ced04
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108382
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/source/gdi/region.cxx b/vcl/source/gdi/region.cxx
index c1d9060d4590..671a80b4807c 100644
--- a/vcl/source/gdi/region.cxx
+++ b/vcl/source/gdi/region.cxx
@@ -1554,9 +1554,9 @@ SvStream& ReadRegion(SvStream& rIStrm, vcl::Region& rRegion)
 
         default:
         {
-            RegionBand* pNewRegionBand = new RegionBand();
-            bool bSuccess = pNewRegionBand->load(rIStrm);
-            rRegion.mpRegionBand.reset(pNewRegionBand);
+            std::shared_ptr<RegionBand> xNewRegionBand(std::make_shared<RegionBand>());
+            bool bSuccess = xNewRegionBand->load(rIStrm);
+            rRegion.mpRegionBand = xNewRegionBand;
 
             bool bHasPolyPolygon(false);
             if (aCompat.GetVersion() >= 2)


More information about the Libreoffice-commits mailing list