summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/DriverSampleDxe
diff options
context:
space:
mode:
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2009-04-27 04:55:02 +0000
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2009-04-27 04:55:02 +0000
commit1d451ff9cf3427c5dc4ba1650d33b1b5aad76d7f (patch)
treeedf9ee8479d2d2ccec62abf26013db9eea4936b2 /MdeModulePkg/Universal/DriverSampleDxe
parent7059dad90457cda5074783411fbe9b513c7c9ae3 (diff)
downloadedk2-platforms-1d451ff9cf3427c5dc4ba1650d33b1b5aad76d7f.tar.xz
Update HiiGetBrowserData API
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8176 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/DriverSampleDxe')
-rw-r--r--MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c12
-rw-r--r--MdeModulePkg/Universal/DriverSampleDxe/DriverSampleDxe.inf2
2 files changed, 9 insertions, 5 deletions
diff --git a/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c b/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c
index 8a46972f7d..0e8efd18d0 100644
--- a/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c
+++ b/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c
@@ -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
diff --git a/MdeModulePkg/Universal/DriverSampleDxe/DriverSampleDxe.inf b/MdeModulePkg/Universal/DriverSampleDxe/DriverSampleDxe.inf
index 657d0ca78e..ff8b49a51d 100644
--- a/MdeModulePkg/Universal/DriverSampleDxe/DriverSampleDxe.inf
+++ b/MdeModulePkg/Universal/DriverSampleDxe/DriverSampleDxe.inf
@@ -61,7 +61,7 @@
[Protocols]
gEfiHiiStringProtocolGuid ## CONSUMES
gEfiHiiConfigRoutingProtocolGuid ## CONSUMES
- gEfiHiiConfigAccessProtocolGuid ## CONSUMES
+ gEfiHiiConfigAccessProtocolGuid ## PRODUCES
gEfiFormBrowser2ProtocolGuid ## CONSUMES
gEfiHiiDatabaseProtocolGuid ## CONSUMES