commit | 10ad1859320c0475bdbf706d4b547e1d292c7111 | [log] [tgz] |
---|---|---|
author | Garret Rieger <grieger@google.com> | Wed Jun 16 16:34:46 2021 -0700 |
committer | Garret Rieger <grieger@google.com> | Wed Jun 16 17:35:39 2021 -0600 |
tree | e3202e249cded66ecf0dbd0f9d50a6357aeae23d | |
parent | 675ebbeb3a0c5b007f87505d6805096a570dd10c [diff] |
[subset] add comment to copy_bytes().
diff --git a/src/hb-serialize.hh b/src/hb-serialize.hh index 2f23b58..f732515 100644 --- a/src/hb-serialize.hh +++ b/src/hb-serialize.hh
@@ -547,6 +547,8 @@ unsigned int len = (this->head - this->start) + (this->end - this->tail); + // If len is zero don't malloc as the memory won't get properly + // cleaned up later. if (!len) return hb_bytes_t (); char *p = (char *) malloc (len);