[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.
This commit is contained in:
Behdad Esfahbod 2018-02-12 18:51:10 -08:00
parent 96f1f52ea3
commit 97a2f03200
1 changed files with 2 additions and 2 deletions

View File

@ -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,