vcl/source/gdi/embeddedfontsafdko.cxx |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 76e335035da9e944a649d5e79b7814b8eb9b1b1f
Author:     Caolán McNamara <[email protected]>
AuthorDate: Thu Oct 16 20:20:27 2025 +0100
Commit:     Caolán McNamara <[email protected]>
CommitDate: Fri Oct 17 09:20:56 2025 +0200

    fclose file before rename
    
    Change-Id: Icda37010adea152c9a8c14e22840717a4908c488
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192550
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <[email protected]>

diff --git a/vcl/source/gdi/embeddedfontsafdko.cxx 
b/vcl/source/gdi/embeddedfontsafdko.cxx
index 618006122efb..c067c6e2d10f 100644
--- a/vcl/source/gdi/embeddedfontsafdko.cxx
+++ b/vcl/source/gdi/embeddedfontsafdko.cxx
@@ -186,11 +186,10 @@ bool EmbeddedFontsManager::mergefonts(const OUString& 
cidFontInfoUrl, const OUSt
     h->dst.stm.filename = const_cast<char*>(tmpdestfile.getStr());
     setMode(h, mode_t1);
     bool result = convertTx(h);
+    mergeFontsFree(h);
 
     remove(destFilePathA.getStr());
-    rename(h->dst.stm.filename, destFilePathA.getStr());
-
-    mergeFontsFree(h);
+    rename(tmpdestfile.getStr(), destFilePathA.getStr());
 
     return result;
 }

Reply via email to