1) Add in fix to handle the case when a form is not related to a buffer storage.

2) Allocate Hii Handle from a bitfield array so Framework Hii Handle can be recycled.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5700 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
qwang12
2008-08-20 14:17:24 +00:00
parent 1a8802f763
commit d4775f2a4c
9 changed files with 285 additions and 202 deletions

View File

@@ -633,12 +633,14 @@ CreateIfrDataArray (
LIST_ENTRY *Link;
EFI_STATUS Status;
Link = GetFirstNode (&ConfigAccess->BufferStorageListHead);
if (IsNull (&ConfigAccess->BufferStorageListHead, Link)) {
return NULL;
}
IfrDataArray = AllocateZeroPool (0x100);
ASSERT (IfrDataArray != NULL);
Link = GetFirstNode (&ConfigAccess->BufferStorageListHead);
ASSERT (!IsNull (&ConfigAccess->BufferStorageListHead, Link));
BufferStorageEntry = BUFFER_STORAGE_ENTRY_FROM_LINK(Link);
BrowserDataSize = BufferStorageEntry->Size;
@@ -702,11 +704,13 @@ DestroyIfrDataArray (
IN BOOLEAN NvMapAllocated
)
{
if (NvMapAllocated) {
FreePool (Array->NvRamMap);
}
if (Array != NULL) {
if (NvMapAllocated) {
FreePool (Array->NvRamMap);
}
FreePool (Array);
FreePool (Array);
}
}
@@ -950,6 +954,7 @@ ThunkCallback (
*ActionRequest = EFI_BROWSER_ACTION_REQUEST_SUBMIT;
}
DestroyIfrDataArray (Data, NvMapAllocated);
return Status;