summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c
diff options
context:
space:
mode:
Diffstat (limited to 'OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c')
-rw-r--r--OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c b/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c
index 76512534f5..7bb2e3f218 100644
--- a/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c
+++ b/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c
@@ -848,6 +848,13 @@ InstallQemuFwCfgTables (
//
if (S3Context != NULL) {
Status = TransferS3ContextToBootScript (S3Context);
+ if (EFI_ERROR (Status)) {
+ goto UninstallAcpiTables;
+ }
+ //
+ // Ownership of S3Context has been transfered.
+ //
+ S3Context = NULL;
}
UninstallAcpiTables: