Use correct link list traverse functions.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5713 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
qwang12 2008-08-22 14:54:26 +00:00
parent 8cf43dd722
commit b074cb3927
1 changed files with 3 additions and 5 deletions

View File

@ -760,16 +760,14 @@ FreeDefaultList (
LIST_ENTRY *Link;
UEFI_IFR_BUFFER_STORAGE_NODE *Default;
while (!IsListEmpty (ListHead)) {
Link = GetFirstNode (ListHead);
while (!IsNull (ListHead, Link)) {
Default = UEFI_IFR_BUFFER_STORAGE_NODE_FROM_LIST(Link);
RemoveEntryList (Link);
DestroyDefaultNode (Default);
Link = GetNextNode (ListHead, Link);
}
FreePool (ListHead);