Commit b1c90733ee6a04882b133101d61b12e352eeb290

Werner Lemberg 2023-01-07T07:40:12

* src/autofit/ft-hb.c (_hb_ft_reference_table): Minor integration fixes.

diff --git a/src/autofit/ft-hb.c b/src/autofit/ft-hb.c
index b06121f..1958f9c 100644
--- a/src/autofit/ft-hb.c
+++ b/src/autofit/ft-hb.c
@@ -38,6 +38,7 @@
 static hb_blob_t *
 _hb_ft_reference_table (hb_face_t *face, hb_tag_t tag, void *user_data)
 {
+  FT_UNUSED (face);
   FT_Face ft_face = (FT_Face) user_data;
   FT_Byte *buffer;
   FT_ULong  length = 0;
@@ -49,7 +50,7 @@ _hb_ft_reference_table (hb_face_t *face, hb_tag_t tag, void *user_data)
   if (error)
     return NULL;
 
-  buffer = (FT_Byte *) malloc (length);
+  buffer = (FT_Byte *) ft_smalloc (length);
   if (!buffer)
     return NULL;
 
@@ -62,7 +63,7 @@ _hb_ft_reference_table (hb_face_t *face, hb_tag_t tag, void *user_data)
 
   return hb_blob_create ((const char *) buffer, length,
                          HB_MEMORY_MODE_WRITABLE,
-                         buffer, free);
+                         buffer, ft_sfree);
 }
 
 static hb_face_t *