[HarfBuzz] harfbuzz: Branch 'master'
Behdad Esfahbod
behdad at kemper.freedesktop.org
Tue Feb 13 02:51:49 UTC 2018
src/hb-subset-glyf.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 97a2f0320056b591d7a747022869fe9cd8ecc6e1
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Mon Feb 12 18:51:10 2018 -0800
[subset] Allocate bulk memory with malloc(), not calloc()
We use calloc() to allocate simple structs and set them to zero.
For bulk memory, use malloc() that doesn't zero.
diff --git a/src/hb-subset-glyf.cc b/src/hb-subset-glyf.cc
index 95294678..0a06313e 100644
--- a/src/hb-subset-glyf.cc
+++ b/src/hb-subset-glyf.cc
@@ -132,8 +132,8 @@ _hb_subset_glyf_and_loca (const OT::glyf::accelerator_t &glyf,
return false;
}
- char *glyf_prime_data = (char *) calloc (glyf_prime_size, 1);
- char *loca_prime_data = (char *) calloc (loca_prime_size, 1);
+ char *glyf_prime_data = (char *) malloc (glyf_prime_size);
+ char *loca_prime_data = (char *) malloc (loca_prime_size);
if (unlikely (!_write_glyf_and_loca_prime (glyf, glyf_data, glyphs_to_retain,
*use_short_loca,
glyf_prime_size, glyf_prime_data,
More information about the HarfBuzz
mailing list