public inbox for
 help / color / mirror / Atom feed
From: "Nate DeSimone" <>
To: "Pabba, PhanindraX Babu" <>,
	"" <>
Cc: "Chiu, Chasel" <>,
	Liming Gao <>,
	"Dong, Eric" <>
Subject: Re: [edk2-devel] [PATCH] MinPlatformPkg: Add missed call to FreePool
Date: Mon, 25 Mar 2024 22:36:02 +0000	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

Hi Babu,

If the call to InitializeHeader() fails then the buffer will still not be de-allcoated properly. Please add a Done: label and a goto Done; so that the buffer will still be freed in the case of an error.


-----Original Message-----
From: Pabba, PhanindraX Babu <> 
Sent: Thursday, February 22, 2024 10:01 PM
Cc: Pabba, PhanindraX Babu <>; Chiu, Chasel <>; Desimone, Nathaniel L <>; Liming Gao <>; Dong, Eric <>
Subject: [PATCH] MinPlatformPkg: Add missed call to FreePool

From: PhanindraX Babu Pabba <>

Adding missed out call to FreePool API to free the allocated memory.

Cc: Chasel Chiu <>
Cc: Nate DeSimone <>
Cc: Liming Gao <>
Cc: Eric Dong <>
Signed-off-by: PhanindraX Babu Pabba <>
 Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c | 2 +-
 Platform/Intel/MinPlatformPkg/Acpi/MinDsdt/MinDsdt.c         | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
index 2a833ec9..f637e1c9 100644
--- a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
+++ b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
@@ -1002,7 +1002,7 @@ InstallMcfgFromScratch (
                          McfgTable->Header.Length,                          &TableHandle                          );-+  FreePool (McfgTable);   return Status; } diff --git a/Platform/Intel/MinPlatformPkg/Acpi/MinDsdt/MinDsdt.c b/Platform/Intel/MinPlatformPkg/Acpi/MinDsdt/MinDsdt.c
index 9bc22245..f5b1a71c 100644
--- a/Platform/Intel/MinPlatformPkg/Acpi/MinDsdt/MinDsdt.c
+++ b/Platform/Intel/MinPlatformPkg/Acpi/MinDsdt/MinDsdt.c
@@ -195,6 +195,7 @@ PublishAcpiTablesFromFv (
       // Increment the instance       //       Instance++;+      FreePool (CurrentTable);       CurrentTable = NULL;     }   }--

-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group.
View/Reply Online (#117095):
Mute This Topic:
Group Owner:
Unsubscribe: []

  reply	other threads:[~2024-03-25 22:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-23  6:01 [edk2-devel] [PATCH] MinPlatformPkg: Add missed call to FreePool phanindrax.babu.pabba
2024-03-25 22:36 ` Nate DeSimone [this message]
2024-03-27 19:10 phanindrax.babu.pabba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox