[serialize] Actually reclaim storage from duplicate objects

This commit is contained in:
Behdad Esfahbod 2019-04-02 23:10:03 -07:00
parent 3305a2cad2
commit 6215fb8e68
1 changed files with 1 additions and 1 deletions

View File

@ -198,6 +198,7 @@ struct hb_serialize_context_t
obj->tail = head;
obj->next = nullptr;
unsigned len = obj->tail - obj->head;
head = obj->head; /* Rewind head. */
if (!len)
{
@ -214,7 +215,6 @@ struct hb_serialize_context_t
tail -= len;
memmove (tail, obj->head, len);
head = obj->head;
obj->head = tail;
obj->tail = tail + len;