]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatform.c
MdeModulePkg/AcpiPlatformDxe: Unload after execution.
[mirror_edk2.git] / MdeModulePkg / Universal / Acpi / AcpiPlatformDxe / AcpiPlatform.c
old mode 100755 (executable)
new mode 100644 (file)
index 81ecc2a..8f335bd
@@ -1,8 +1,8 @@
 /** @file\r
   Sample ACPI Platform Driver\r
 \r
-  Copyright (c) 2008 - 2010, Intel Corporation<BR>\r
-  All rights reserved. This program and the accompanying materials\r
+  Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>\r
+  This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
   http://opensource.org/licenses/bsd-license.php\r
@@ -237,6 +237,12 @@ AcpiPlatformEntryPoint (
                             TableSize,\r
                             &TableHandle\r
                             );\r
+\r
+      //\r
+      // Free memory allocated by ReadSection\r
+      //\r
+      gBS->FreePool (CurrentTable);\r
+\r
       if (EFI_ERROR(Status)) {\r
         return EFI_ABORTED;\r
       }\r
@@ -249,6 +255,9 @@ AcpiPlatformEntryPoint (
     }\r
   }\r
 \r
-  return EFI_SUCCESS;\r
+  //\r
+  // The driver does not require to be kept loaded.\r
+  //\r
+  return EFI_REQUEST_UNLOAD_IMAGE;\r
 }\r
 \r