]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatform.c
MdeModulePkg: Clean up source files
[mirror_edk2.git] / MdeModulePkg / Universal / Acpi / AcpiPlatformDxe / AcpiPlatform.c
index 81ecc2a4dc3ce636f68fe8b11071c7a271c4de57..c6238fd38efcc5533ce6f987c2cfdd3e2fd59835 100644 (file)
@@ -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
@@ -10,7 +10,7 @@
   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
-**/ \r
+**/\r
 \r
 #include <PiDxe.h>\r
 \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