[subset] don't alloc zero bytes.
It will be leaked later since hb_blob_create() won't set up the blob to cleanup since it has length zero.
This commit is contained in:
parent
93e6a9bc4e
commit
675ebbeb3a
|
@ -547,6 +547,8 @@ struct hb_serialize_context_t
|
|||
unsigned int len = (this->head - this->start)
|
||||
+ (this->end - this->tail);
|
||||
|
||||
if (!len) return hb_bytes_t ();
|
||||
|
||||
char *p = (char *) malloc (len);
|
||||
if (unlikely (!p)) return hb_bytes_t ();
|
||||
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue