changeset 32666:4536ded2a52b

maint: Merge stable to default
author Arun Giridhar <arungiridhar@gmail.com>
date Fri, 29 Dec 2023 08:54:01 -0500
parents f8e766a30c38 (current diff) 27bc8e663a2c (diff)
children 29596001d61d 0a98169f67f0
files libinterp/corefcn/ft-text-renderer.cc
diffstat 2 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/ft-text-renderer.cc	Thu Dec 28 14:06:53 2023 -0800
+++ b/libinterp/corefcn/ft-text-renderer.cc	Fri Dec 29 08:54:01 2023 -0500
@@ -259,8 +259,15 @@
             font_map.assign ("weight", weights);
             font_map.assign ("suitable", suitable);
 
+            // Free up memory within libfontconfig 
             if (fs)
               FcFontSetDestroy (fs);
+            if (pat)  // Supposed to be freed by FcFontSetDestroy above, but isn't.
+              FcPatternDestroy (pat);
+            if (os)
+              FcObjectSetDestroy (os);
+            if (minimal_charset)
+              FcCharSetDestroy (minimal_charset);
           }
 #endif
       }
--- a/liboctave/wrappers/uniconv-wrappers.c	Thu Dec 28 14:06:53 2023 -0800
+++ b/liboctave/wrappers/uniconv-wrappers.c	Fri Dec 29 08:54:01 2023 -0500
@@ -84,7 +84,7 @@
   char *ret = u8_conv_to_encoding (tocode, handler, cu8_str, padlen,
                                    offsets, NULL, lengthp);
 
-  if (srclen > padlen)
+  if (srclen < padlen)
     free ((void *) u8_str);
 
   // FIXME: This assumes that "\0" is converted to a single byte.  This might