From 71969d1edfac78f2bd2f76f0210848d124f38ed0 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Mon, 20 Sep 2021 14:31:45 -0400 Subject: [PATCH] * src/cff/cffdrivr.c (cff_ps_get_font_{info,extra}): Use FT_QNEW. --- src/cff/cffdrivr.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/cff/cffdrivr.c b/src/cff/cffdrivr.c index 9bde3c7b7..b33435b44 100644 --- a/src/cff/cffdrivr.c +++ b/src/cff/cffdrivr.c @@ -473,12 +473,12 @@ if ( cff && !cff->font_info ) { - CFF_FontRecDict dict = &cff->top_font.font_dict; - PS_FontInfoRec *font_info = NULL; - FT_Memory memory = face->root.memory; + CFF_FontRecDict dict = &cff->top_font.font_dict; + FT_Memory memory = face->root.memory; + PS_FontInfoRec* font_info; - if ( FT_QALLOC( font_info, sizeof ( *font_info ) ) ) + if ( FT_QNEW( font_info ) ) goto Fail; font_info->version = cff_index_get_sid_string( cff, @@ -515,15 +515,15 @@ FT_Error error = FT_Err_Ok; - if ( cff && cff->font_extra == NULL ) + if ( cff && !cff->font_extra ) { - CFF_FontRecDict dict = &cff->top_font.font_dict; - PS_FontExtraRec* font_extra = NULL; - FT_Memory memory = face->root.memory; + CFF_FontRecDict dict = &cff->top_font.font_dict; + FT_Memory memory = face->root.memory; + PS_FontExtraRec* font_extra; FT_String* embedded_postscript; - if ( FT_ALLOC( font_extra, sizeof ( *font_extra ) ) ) + if ( FT_QNEW( font_extra ) ) goto Fail; font_extra->fs_type = 0U;