[test/api] Fix leaks

This commit is contained in:
Behdad Esfahbod 2022-02-15 14:30:12 -06:00
parent 531c27d199
commit 197ed8f592
1 changed files with 10 additions and 6 deletions

View File

@ -53,12 +53,16 @@ HB_BEGIN_DECLS
((const char *) s)[3]))
#define HB_FACE_ADD_TABLE(face, tag, data) \
hb_face_builder_add_table ((face), \
HB_TAG_CHAR4(tag), \
hb_blob_create_or_fail ((data), \
sizeof (data), \
HB_MEMORY_MODE_READONLY, \
NULL, NULL))
do { \
hb_blob_t *blob = hb_blob_create_or_fail ((data), \
sizeof (data), \
HB_MEMORY_MODE_READONLY, \
NULL, NULL); \
hb_face_builder_add_table ((face), \
HB_TAG_CHAR4(tag), \
blob); \
hb_blob_destroy (blob); \
} while (0)
static inline const char *
srcdir (void)