Update HiiGetBrowserData API

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8176 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
lgao4
2009-04-27 04:55:02 +00:00
parent 7059dad904
commit 1d451ff9cf
8 changed files with 55 additions and 125 deletions

View File

@ -260,8 +260,9 @@ SetPassword (
//
// Retrive uncommitted data from Browser
//
Configuration = (DRIVER_SAMPLE_CONFIGURATION *) HiiGetBrowserData (&mFormSetGuid, VariableName, sizeof (DRIVER_SAMPLE_CONFIGURATION));
if (Configuration != NULL) {
Configuration = AllocateZeroPool (sizeof (DRIVER_SAMPLE_CONFIGURATION));
ASSERT (Configuration != NULL);
if (HiiGetBrowserData (&mFormSetGuid, VariableName, sizeof (DRIVER_SAMPLE_CONFIGURATION), (UINT8 *) Configuration)) {
//
// Update password's clear text in the screen
//
@ -277,10 +278,13 @@ SetPassword (
(UINT8 *) Configuration,
NULL
);
FreePool (Configuration);
}
//
// Free Configuration Buffer
//
FreePool (Configuration);
//
// Set password