[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:
parent
96f1f52ea3
commit
97a2f03200
@ -132,8 +132,8 @@ _hb_subset_glyf_and_loca (const OT::glyf::accelerator_t &glyf,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *glyf_prime_data = (char *) calloc (glyf_prime_size, 1);
|
char *glyf_prime_data = (char *) malloc (glyf_prime_size);
|
||||||
char *loca_prime_data = (char *) calloc (loca_prime_size, 1);
|
char *loca_prime_data = (char *) malloc (loca_prime_size);
|
||||||
if (unlikely (!_write_glyf_and_loca_prime (glyf, glyf_data, glyphs_to_retain,
|
if (unlikely (!_write_glyf_and_loca_prime (glyf, glyf_data, glyphs_to_retain,
|
||||||
*use_short_loca,
|
*use_short_loca,
|
||||||
glyf_prime_size, glyf_prime_data,
|
glyf_prime_size, glyf_prime_data,
|
||||||
|
Loading…
Reference in New Issue
Block a user