From 22f5582e62c270b37969d91ff8e2afcc58f7cbcd Mon Sep 17 00:00:00 2001 From: vanjeff Date: Wed, 30 Apr 2008 07:30:25 +0000 Subject: fixed bug for special case. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5154 6f19259b-4bc3-4df7-8a09-765794883524 --- .../Compatibility/FrameworkHiiToUefiHiiThunk/Forms.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/Forms.c b/EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/Forms.c index ee4e2ac988..205eea604b 100644 --- a/EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/Forms.c +++ b/EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/Forms.c @@ -459,11 +459,7 @@ Returns: Status = IfrLibUpdateForm (UefiHiiHandle, &FormsetGuid, FormId, Label, AddData, UefiHiiUpdateData); ASSERT_EFI_ERROR (Status); - } else { - ASSERT (FALSE); - return EFI_INVALID_PARAMETER; - } - + } } else { Status = ThunkLocateFormId (UefiHiiHandle, Label, &FormsetGuid, &FormId); ASSERT_EFI_ERROR (Status); @@ -471,8 +467,9 @@ Returns: // // Delete Opcode starting from Labe in FormId found // - - Status = IfrLibUpdateForm (UefiHiiHandle, &FormsetGuid, FormId, Label, FALSE, NULL); + UefiHiiUpdateData = AllocateZeroPool (sizeof (*UefiHiiUpdateData)); + + Status = IfrLibUpdateForm (UefiHiiHandle, &FormsetGuid, FormId, Label, FALSE, UefiHiiUpdateData); ASSERT_EFI_ERROR (Status); } -- cgit v1.2.3