From: phanindrax.babu.pabba@intel.com
To: devel@edk2.groups.io
Cc: PhanindraX Babu Pabba <phanindrax.babu.pabba@intel.com>,
Chasel Chiu <chasel.chiu@intel.com>,
Nate DeSimone <nathaniel.l.desimone@intel.com>,
Liming Gao <gaoliming@byosoft.com.cn>,
Eric Dong <eric.dong@intel.com>
Subject: [edk2-devel] [edk2-platforms: PATCH v2] MinPlatformPkg: Add missed call to FreePool
Date: Thu, 28 Mar 2024 02:57:21 +0530 [thread overview]
Message-ID: <20240327212720.5964-1-phanindrax.babu.pabba@intel.com> (raw)
From: PhanindraX Babu Pabba <phanindrax.babu.pabba@intel.com>
Adding missed out call to FreePool API to free the
allocated memory.
Signed-off-by: PhanindraX Babu Pabba <phanindrax.babu.pabba@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Eric Dong <eric.dong@intel.com>
---
Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c | 5 +++--
Platform/Intel/MinPlatformPkg/Acpi/MinDsdt/MinDsdt.c | 1 +
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
index 2a833ec9..9a91d131 100644
--- a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
+++ b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
@@ -975,7 +975,7 @@ InstallMcfgFromScratch (
FixedPcdGet32 (PcdAcpiDefaultOemRevision)
);
if (EFI_ERROR (Status)) {
- return Status;
+ goto Done;
}
//
@@ -1002,7 +1002,8 @@ InstallMcfgFromScratch (
McfgTable->Header.Length,
&TableHandle
);
-
+Done:
+ 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;
}
}
--
2.39.1.windows.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#117183): https://edk2.groups.io/g/devel/message/117183
Mute This Topic: https://groups.io/mt/105186400/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
next reply other threads:[~2024-03-27 23:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-27 21:27 phanindrax.babu.pabba [this message]
2024-03-27 21:38 ` [edk2-devel] [edk2-platforms: PATCH v2] MinPlatformPkg: Add missed call to FreePool Chiu, Chasel
2024-04-02 4:18 ` Chiu, Chasel
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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240327212720.5964-1-phanindrax.babu.pabba@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* 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