starmath/source/mathml/import.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit c6d852d6ee54e3261103f253267bd676195b327a
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Wed Jul 30 11:04:35 2025 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Thu Jul 31 15:03:14 2025 +0200

    cid#1660282 Resource leak
    
    this all looks a bit error prone, but minimally fix this.
    
    Change-Id: Icfaf38c3c2028cc591f5c4bae0317587eccf5d48
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188591
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    Tested-by: Jenkins

diff --git a/starmath/source/mathml/import.cxx 
b/starmath/source/mathml/import.cxx
index 9c3392fa2b38..f3c2996d6a04 100644
--- a/starmath/source/mathml/import.cxx
+++ b/starmath/source/mathml/import.cxx
@@ -917,8 +917,8 @@ void SmMLImportContext::handleAttributes(const 
Reference<XFastAttributeList>& aA
             case XML_HREF:
             {
                 
aAttribute.setMlAttributeValueType(SmMlAttributeValueType::MlHref);
-                OUString* aRef = new OUString(aIter.toString());
-                SmMlHref aHref = { SmMlAttributeValueHref::NMlValid, aRef };
+                OUString aRef(aIter.toString());
+                SmMlHref aHref = { SmMlAttributeValueHref::NMlValid, &aRef };
                 aAttribute.setMlHref(&aHref);
                 break;
             }

Reply via email to