diff options
Diffstat (limited to 'MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideDxe.c')
-rw-r--r-- | MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideDxe.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideDxe.c b/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideDxe.c index 47921cd43b..2c1d9d96c5 100644 --- a/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideDxe.c +++ b/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideDxe.c @@ -1211,8 +1211,8 @@ PlatOverMngrRouteConfig ( PLAT_OVER_MNGR_DATA *FakeNvData;
Private = EFI_CALLBACK_INFO_FROM_THIS (This);
- FakeNvData = (PLAT_OVER_MNGR_DATA *) HiiGetBrowserData (&mPlatformOverridesManagerGuid, mVariableName, sizeof (PLAT_OVER_MNGR_DATA));
- if (FakeNvData == NULL) {
+ FakeNvData = &Private->FakeNvData;
+ if (HiiGetBrowserData (&mPlatformOverridesManagerGuid, mVariableName, sizeof (PLAT_OVER_MNGR_DATA), (UINT8 *) FakeNvData)) {
return EFI_NOT_FOUND;
}
@@ -1233,10 +1233,6 @@ PlatOverMngrRouteConfig ( CommintChanges (Private, KeyValue, FakeNvData);
}
- if (FakeNvData != NULL) {
- FreePool (FakeNvData);
- }
-
return EFI_SUCCESS;
}
@@ -1279,8 +1275,8 @@ PlatOverMngrCallback ( PLAT_OVER_MNGR_DATA *FakeNvData;
Private = EFI_CALLBACK_INFO_FROM_THIS (This);
- FakeNvData = (PLAT_OVER_MNGR_DATA *) HiiGetBrowserData (&mPlatformOverridesManagerGuid, mVariableName, sizeof (PLAT_OVER_MNGR_DATA));
- if (FakeNvData == NULL) {
+ FakeNvData = &Private->FakeNvData;
+ if (HiiGetBrowserData (&mPlatformOverridesManagerGuid, mVariableName, sizeof (PLAT_OVER_MNGR_DATA), (UINT8 *) FakeNvData)) {
return EFI_NOT_FOUND;
}
@@ -1344,14 +1340,6 @@ PlatOverMngrCallback ( // Pass changed uncommitted data back to Form Browser
//
HiiSetBrowserData (&mPlatformOverridesManagerGuid, mVariableName, sizeof (PLAT_OVER_MNGR_DATA), (UINT8 *) FakeNvData, NULL);
-
- //
- // Update local configuration buffer.
- //
- CopyMem (&Private->FakeNvData, FakeNvData, sizeof (PLAT_OVER_MNGR_DATA));
- if (FakeNvData != NULL) {
- FreePool (FakeNvData);
- }
return EFI_SUCCESS;
}
|