From 6215fb8e68bdf69f4af9f7f4959ad55a70723774 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 2 Apr 2019 23:10:03 -0700 Subject: [PATCH] [serialize] Actually reclaim storage from duplicate objects --- src/hb-serialize.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hb-serialize.hh b/src/hb-serialize.hh index d8a197b4d..e1c283c1e 100644 --- a/src/hb-serialize.hh +++ b/src/hb-serialize.hh @@ -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;