i18npool/inc/transliteration_Ignore.hxx                  |    3 ++-
 i18npool/source/transliteration/ignoreDiacritics_CTL.cxx |    4 ++--
 sccomp/source/solver/CoinMPSolver.cxx                    |    1 +
 3 files changed, 5 insertions(+), 3 deletions(-)

New commits:
commit 192d7614b41dfeff4e6a507243f3a2948589ba8b
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Mon May 17 12:40:48 2021 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Mon May 17 19:43:56 2021 +0200

    don't leak on error path in Coin solver
    
    Change-Id: Ice460975511dbdfcfcde9a829283d2abac14c263
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115698
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sccomp/source/solver/CoinMPSolver.cxx 
b/sccomp/source/solver/CoinMPSolver.cxx
index bd12c85c4fc4..35ebf1fd19b2 100644
--- a/sccomp/source/solver/CoinMPSolver.cxx
+++ b/sccomp/source/solver/CoinMPSolver.cxx
@@ -326,6 +326,7 @@ void SAL_CALL CoinMPSolver::solve()
         }
         catch (const CoinError& e)
         {
+            CoinUnloadProblem(hProb);
             throw std::runtime_error(e.message());
         }
     }
commit 901b05e9fc852333824b6e58d0a30834b1211acd
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Mon May 17 13:07:22 2021 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Mon May 17 19:43:49 2021 +0200

    don't leak ICU transliterator
    
    Change-Id: Ib2c09c6c63b94d078ddde15585caa59710953bba
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115702
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/i18npool/inc/transliteration_Ignore.hxx 
b/i18npool/inc/transliteration_Ignore.hxx
index 838c48d53803..854dbfeb5cac 100644
--- a/i18npool/inc/transliteration_Ignore.hxx
+++ b/i18npool/inc/transliteration_Ignore.hxx
@@ -21,6 +21,7 @@
 
 #include "transliteration_commonclass.hxx"
 #include <unicode/translit.h>
+#include <memory>
 
 namespace i18nutil { class oneToOneMapping; }
 
@@ -91,7 +92,7 @@ TRANSLITERATION_IGNORE(Kashida_CTL)
 
 class ignoreDiacritics_CTL final : public transliteration_Ignore
 {
-    icu::Transliterator* m_transliterator;
+    std::unique_ptr<icu::Transliterator> m_transliterator;
 
 public:
     ignoreDiacritics_CTL();
diff --git a/i18npool/source/transliteration/ignoreDiacritics_CTL.cxx 
b/i18npool/source/transliteration/ignoreDiacritics_CTL.cxx
index ada76a735b80..5980f8e8d2f7 100644
--- a/i18npool/source/transliteration/ignoreDiacritics_CTL.cxx
+++ b/i18npool/source/transliteration/ignoreDiacritics_CTL.cxx
@@ -23,8 +23,8 @@ ignoreDiacritics_CTL::ignoreDiacritics_CTL()
     implementationName = 
"com.sun.star.i18n.Transliteration.ignoreDiacritics_CTL";
 
     UErrorCode nStatus = U_ZERO_ERROR;
-    m_transliterator = icu::Transliterator::createInstance("NFD; [:M:] Remove; 
NFC",
-            UTRANS_FORWARD, nStatus);
+    m_transliterator.reset( icu::Transliterator::createInstance("NFD; [:M:] 
Remove; NFC",
+            UTRANS_FORWARD, nStatus) );
     if (U_FAILURE(nStatus))
         m_transliterator = nullptr;
 }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to