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>
This commit is contained in:
Dandan Bi 2016-05-11 10:04:19 +08:00 committed by Star Zeng
parent 7b13510f2a
commit fa209e8c20
1 changed files with 2 additions and 1 deletions

View File

@ -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.
//