[serialize] Adjust pop_discard for zerocopy

This commit is contained in:
Behdad Esfahbod 2022-12-02 14:26:36 -07:00
parent 043eeb29a3
commit 3ade2ffaa5
1 changed files with 2 additions and 1 deletions

View File

@ -326,7 +326,8 @@ struct hb_serialize_context_t
if (unlikely (in_error() && !only_overflow ())) return; if (unlikely (in_error() && !only_overflow ())) return;
current = current->next; current = current->next;
revert (obj->head, obj->tail); revert (zerocopy ? zerocopy : obj->head, obj->tail);
zerocopy = nullptr;
obj->fini (); obj->fini ();
object_pool.release (obj); object_pool.release (obj);
} }