* [edk2-devel] [edk2-platforms: PATCH v2] MinPlatformPkg: Add missed call to FreePool
@ 2024-03-27 21:27 phanindrax.babu.pabba
2024-03-27 21:38 ` Chiu, Chasel
2024-04-02 4:18 ` Chiu, Chasel
0 siblings, 2 replies; 3+ messages in thread
From: phanindrax.babu.pabba @ 2024-03-27 21:27 UTC (permalink / raw)
To: devel
Cc: PhanindraX Babu Pabba, Chasel Chiu, Nate DeSimone, Liming Gao,
Eric Dong
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]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [edk2-devel] [edk2-platforms: PATCH v2] MinPlatformPkg: Add missed call to FreePool
2024-03-27 21:27 [edk2-devel] [edk2-platforms: PATCH v2] MinPlatformPkg: Add missed call to FreePool phanindrax.babu.pabba
@ 2024-03-27 21:38 ` Chiu, Chasel
2024-04-02 4:18 ` Chiu, Chasel
1 sibling, 0 replies; 3+ messages in thread
From: Chiu, Chasel @ 2024-03-27 21:38 UTC (permalink / raw)
To: Pabba, PhanindraX Babu, devel@edk2.groups.io
Cc: Desimone, Nathaniel L, Liming Gao, Dong, Eric
Thanks Phanindra!
Reviewed-by: Chasel Chiu <chasel.chiu@intel.com>
> -----Original Message-----
> From: Pabba, PhanindraX Babu <phanindrax.babu.pabba@intel.com>
> Sent: Wednesday, March 27, 2024 2:27 PM
> To: devel@edk2.groups.io
> Cc: Pabba, PhanindraX Babu <phanindrax.babu.pabba@intel.com>; Chiu, Chasel
> <chasel.chiu@intel.com>; Desimone, Nathaniel L
> <nathaniel.l.desimone@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>;
> Dong, Eric <eric.dong@intel.com>
> Subject: [edk2-platforms: PATCH v2] MinPlatformPkg: Add missed call to FreePool
>
> 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 (#117181): https://edk2.groups.io/g/devel/message/117181
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]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [edk2-devel] [edk2-platforms: PATCH v2] MinPlatformPkg: Add missed call to FreePool
2024-03-27 21:27 [edk2-devel] [edk2-platforms: PATCH v2] MinPlatformPkg: Add missed call to FreePool phanindrax.babu.pabba
2024-03-27 21:38 ` Chiu, Chasel
@ 2024-04-02 4:18 ` Chiu, Chasel
1 sibling, 0 replies; 3+ messages in thread
From: Chiu, Chasel @ 2024-04-02 4:18 UTC (permalink / raw)
To: Pabba, PhanindraX Babu, devel@edk2.groups.io
Cc: Desimone, Nathaniel L, Liming Gao, Dong, Eric
Patch pushed:
https://github.com/tianocore/edk2-platforms/commit/ce4b8e394077f7f10ace2c6e96767f676c000355
Thanks,
Chasel
> -----Original Message-----
> From: Pabba, PhanindraX Babu <phanindrax.babu.pabba@intel.com>
> Sent: Wednesday, March 27, 2024 2:27 PM
> To: devel@edk2.groups.io
> Cc: Pabba, PhanindraX Babu <phanindrax.babu.pabba@intel.com>; Chiu, Chasel
> <chasel.chiu@intel.com>; Desimone, Nathaniel L
> <nathaniel.l.desimone@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>;
> Dong, Eric <eric.dong@intel.com>
> Subject: [edk2-platforms: PATCH v2] MinPlatformPkg: Add missed call to FreePool
>
> 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 (#117316): https://edk2.groups.io/g/devel/message/117316
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]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-04-02 4:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-27 21:27 [edk2-devel] [edk2-platforms: PATCH v2] MinPlatformPkg: Add missed call to FreePool phanindrax.babu.pabba
2024-03-27 21:38 ` Chiu, Chasel
2024-04-02 4:18 ` Chiu, Chasel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox