[truetype] Avoid some memory zeroing. * src/truetype/ttgload.c (load_truetype_glyph): Use Q-macro. * src/truetype/ttinterp.c (Update_Max): Ditto. * src/truetype/ttpload.c (src/truetype/ttpload.c): Ditto.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c
index b490b84..bb948e4 100644
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -1920,7 +1920,7 @@
else
{
- if ( FT_NEW( node ) )
+ if ( FT_QNEW( node ) )
goto Exit;
node->data = FT_UINT_TO_POINTER( glyph_index );
FT_List_Add( &loader->composites, node );
diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c
index 96b48a0..35ba626 100644
--- a/src/truetype/ttinterp.c
+++ b/src/truetype/ttinterp.c
@@ -375,7 +375,7 @@
if ( *size < new_max )
{
- if ( FT_REALLOC( *pbuff, *size * multiplier, new_max * multiplier ) )
+ if ( FT_QREALLOC( *pbuff, *size * multiplier, new_max * multiplier ) )
return error;
*size = new_max;
}
diff --git a/src/truetype/ttpload.c b/src/truetype/ttpload.c
index 10d07f1..1368e17 100644
--- a/src/truetype/ttpload.c
+++ b/src/truetype/ttpload.c
@@ -571,7 +571,7 @@
goto Fail;
}
- if ( FT_NEW_ARRAY( face->hdmx_record_sizes, num_records ) )
+ if ( FT_QNEW_ARRAY( face->hdmx_record_sizes, num_records ) )
goto Fail;
for ( nn = 0; nn < num_records; nn++ )