freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[freetype2] master d118bf8e3: [bdf, type1] Avoid unnecessary hash zeroin


From: Werner Lemberg
Subject: [freetype2] master d118bf8e3: [bdf, type1] Avoid unnecessary hash zeroing.
Date: Sat, 15 Jan 2022 23:14:47 -0500 (EST)

branch: master
commit d118bf8e35e69454ed046b57ac54dd67d49b87d9
Author: Alexei Podtelezhnikov <apodtele@gmail.com>
Commit: Alexei Podtelezhnikov <apodtele@gmail.com>

    [bdf,type1] Avoid unnecessary hash zeroing.
    
    * src/bdf/bdflib.c (_bdf_parse_start): Use `FT_QALLOC`.
    * src/type1/t1load.c (parse_subrs): Use `FT_QNEW`.
---
 src/bdf/bdflib.c   | 2 +-
 src/type1/t1load.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/bdf/bdflib.c b/src/bdf/bdflib.c
index b9bd7678f..6603148a0 100644
--- a/src/bdf/bdflib.c
+++ b/src/bdf/bdflib.c
@@ -1949,7 +1949,7 @@
         }
       }
 
-      if ( FT_ALLOC( p->font->internal, sizeof ( FT_HashRec ) ) )
+      if ( FT_QALLOC( p->font->internal, sizeof ( FT_HashRec ) ) )
         goto Exit;
       error = ft_hash_str_init( (FT_Hash)p->font->internal, memory );
       if ( error )
diff --git a/src/type1/t1load.c b/src/type1/t1load.c
index 622cafb37..2cdf3ed37 100644
--- a/src/type1/t1load.c
+++ b/src/type1/t1load.c
@@ -1772,7 +1772,7 @@
 
       if ( !loader->subrs_hash )
       {
-        if ( FT_NEW( loader->subrs_hash ) )
+        if ( FT_QNEW( loader->subrs_hash ) )
           goto Fail;
 
         error = ft_hash_num_init( loader->subrs_hash, memory );



reply via email to

[Prev in Thread] Current Thread [Next in Thread]