summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal
diff options
context:
space:
mode:
authorDandan Bi <dandan.bi@intel.com>2016-05-11 10:04:19 +0800
committerStar Zeng <star.zeng@intel.com>2016-05-17 14:30:40 +0800
commitfa209e8c20d787c35dbb90c3c33f6db959aa1252 (patch)
tree5c4205a9566b4e2e5777a9128d0d14fd5968eeeb /MdeModulePkg/Universal
parent7b13510f2a0a2a118cdafdaa67720ca8e3fe37de (diff)
downloadedk2-platforms-fa209e8c20d787c35dbb90c3c33f6db959aa1252.tar.xz
MdeModulePkg/SetupBrowser: Should free ConfigResp when it no longer be used
When submit form fail, the progress point to the first fail part in ConfigResp, so should free the ConfigResp after Progrss has been processed. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
Diffstat (limited to 'MdeModulePkg/Universal')
-rw-r--r--MdeModulePkg/Universal/SetupBrowserDxe/Setup.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c
index 23094f8145..f649e04979 100644
--- a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c
+++ b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c
@@ -3228,7 +3228,6 @@ SubmitForForm (
ConfigResp,
&Progress
);
- FreePool (ConfigResp);
if (EFI_ERROR (Status)) {
//
@@ -3237,9 +3236,11 @@ SubmitForForm (
SubmitFormFail = TRUE;
GetSyncRestoreConfigRequest (ConfigInfo->Storage, ConfigInfo->ConfigRequest, Progress, &ConfigInfo->RestoreConfigRequest, &ConfigInfo->SyncConfigRequest);
InsertTailList (&gBrowserSaveFailFormSetList, &ConfigInfo->SaveFailLink);
+ FreePool (ConfigResp);
continue;
}
+ FreePool (ConfigResp);
//
// 3. Config success, update storage shadow Buffer, only update the data belong to this form.
//