vcl/source/bitmap/BitmapMosaicFilter.cxx |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 8fa788c393ed229ed065a3a26f316d02289dd0d3
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Wed May 10 21:36:25 2023 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Thu May 11 12:56:52 2023 +0200

    cid#1529966 silence bogus Resource leak
    
    Bitmap::ReleaseAccess(foo) is just delete foo, so null is fine there
    anyway
    
    Change-Id: I18143c9cf0c63e985866276273b099f5d3b8d5a7
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151649
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/vcl/source/bitmap/BitmapMosaicFilter.cxx 
b/vcl/source/bitmap/BitmapMosaicFilter.cxx
index 25d323d023f0..f9292838df11 100644
--- a/vcl/source/bitmap/BitmapMosaicFilter.cxx
+++ b/vcl/source/bitmap/BitmapMosaicFilter.cxx
@@ -159,11 +159,10 @@ BitmapEx BitmapMosaicFilter::execute(BitmapEx const& 
rBitmapEx) const
         if (pWriteAcc == pReadAcc)
             pWriteAcc = nullptr;
         Bitmap::ReleaseAccess(pReadAcc);
+        Bitmap::ReleaseAccess(pWriteAcc);
 
         if (pNewBmp)
         {
-            Bitmap::ReleaseAccess(pWriteAcc);
-
             if (bRet)
             {
                 const MapMode aMap(aBitmap.GetPrefMapMode());

Reply via email to