/* Release all the fragments of a packet, then free the assemble entry. */
VOID Ip6FreeAssembleEntry(IN IP6_ASSEMBLE_ENTRY *Assemble)
/* Release all the fragments of a packet, then free the assemble entry. */
VOID Ip6FreeAssembleEntry(IN IP6_ASSEMBLE_ENTRY *Assemble)
{
  LIST_ENTRY  *Entry;
  LIST_ENTRY  *Next;
  NET_BUF     *Fragment;
  NET_LIST_FOR_EACH_SAFE (Entry, Next, &Assemble->Fragments) {
    Fragment = NET_LIST_USER_STRUCT (Entry, NET_BUF, List);
    RemoveEntryList (Entry);
    NetbufFree (Fragment);
  }
  if (Assemble->Packet != NULL) {
    NetbufFree (Assemble->Packet);
  }
  FreePool (Assemble);
}