public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH 0/2] UefiLib: Free HandleBuffer for error path in EfiLocateProtocolBuffer().
@ 2018-06-04 10:10 Star Zeng
  2018-06-04 10:10 ` [PATCH 1/2] MdePkg UefiLib: Fix " Star Zeng
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Star Zeng @ 2018-06-04 10:10 UTC (permalink / raw)
  To: edk2-devel; +Cc: Star Zeng, Michael D Kinney, Liming Gao

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>

Star Zeng (2):
  MdePkg UefiLib: Fix in EfiLocateProtocolBuffer()
  IntelFrameworkPkg FrameworkUefiLib: Fix in EfiLocateProtocolBuffer()

 IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLib.c | 4 ++++
 MdePkg/Library/UefiLib/UefiLib.c                     | 4 ++++
 2 files changed, 8 insertions(+)

-- 
2.7.0.windows.1



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] MdePkg UefiLib: Fix in EfiLocateProtocolBuffer()
  2018-06-04 10:10 [PATCH 0/2] UefiLib: Free HandleBuffer for error path in EfiLocateProtocolBuffer() Star Zeng
@ 2018-06-04 10:10 ` Star Zeng
  2018-06-04 10:10 ` [PATCH 2/2] IntelFrameworkPkg FrameworkUefiLib: " Star Zeng
  2018-06-04 21:50 ` [PATCH 0/2] UefiLib: Free HandleBuffer for error path " Kinney, Michael D
  2 siblings, 0 replies; 4+ messages in thread
From: Star Zeng @ 2018-06-04 10:10 UTC (permalink / raw)
  To: edk2-devel; +Cc: Star Zeng, Michael D Kinney, Liming Gao

Free HandleBuffer for error path in EfiLocateProtocolBuffer().

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
---
 MdePkg/Library/UefiLib/UefiLib.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/MdePkg/Library/UefiLib/UefiLib.c b/MdePkg/Library/UefiLib/UefiLib.c
index 23faa63226ef..9ade1b0ce1a0 100644
--- a/MdePkg/Library/UefiLib/UefiLib.c
+++ b/MdePkg/Library/UefiLib/UefiLib.c
@@ -1678,6 +1678,10 @@ EfiLocateProtocolBuffer (
                   (VOID **)Buffer
                   );
   if (EFI_ERROR (Status)) {
+    //
+    // Free the handle buffer
+    //
+    gBS->FreePool (HandleBuffer);
     return EFI_OUT_OF_RESOURCES;
   }
   ZeroMem (*Buffer, NoHandles * sizeof (VOID *));
-- 
2.7.0.windows.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] IntelFrameworkPkg FrameworkUefiLib: Fix in EfiLocateProtocolBuffer()
  2018-06-04 10:10 [PATCH 0/2] UefiLib: Free HandleBuffer for error path in EfiLocateProtocolBuffer() Star Zeng
  2018-06-04 10:10 ` [PATCH 1/2] MdePkg UefiLib: Fix " Star Zeng
@ 2018-06-04 10:10 ` Star Zeng
  2018-06-04 21:50 ` [PATCH 0/2] UefiLib: Free HandleBuffer for error path " Kinney, Michael D
  2 siblings, 0 replies; 4+ messages in thread
From: Star Zeng @ 2018-06-04 10:10 UTC (permalink / raw)
  To: edk2-devel; +Cc: Star Zeng, Michael D Kinney, Liming Gao

Free HandleBuffer for error path in EfiLocateProtocolBuffer().

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
---
 IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLib.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLib.c b/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLib.c
index 1d71f471b84f..3eeb12110a90 100644
--- a/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLib.c
+++ b/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLib.c
@@ -1650,6 +1650,10 @@ EfiLocateProtocolBuffer (
                   (VOID **)Buffer
                   );
   if (EFI_ERROR (Status)) {
+    //
+    // Free the handle buffer
+    //
+    gBS->FreePool (HandleBuffer);
     return EFI_OUT_OF_RESOURCES;
   }
   ZeroMem (*Buffer, NoHandles * sizeof (VOID *));
-- 
2.7.0.windows.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/2] UefiLib: Free HandleBuffer for error path in EfiLocateProtocolBuffer().
  2018-06-04 10:10 [PATCH 0/2] UefiLib: Free HandleBuffer for error path in EfiLocateProtocolBuffer() Star Zeng
  2018-06-04 10:10 ` [PATCH 1/2] MdePkg UefiLib: Fix " Star Zeng
  2018-06-04 10:10 ` [PATCH 2/2] IntelFrameworkPkg FrameworkUefiLib: " Star Zeng
@ 2018-06-04 21:50 ` Kinney, Michael D
  2 siblings, 0 replies; 4+ messages in thread
From: Kinney, Michael D @ 2018-06-04 21:50 UTC (permalink / raw)
  To: Zeng, Star, edk2-devel@lists.01.org, Kinney, Michael D; +Cc: Gao, Liming

Series Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>

Mike

> -----Original Message-----
> From: Zeng, Star
> Sent: Monday, June 4, 2018 3:11 AM
> To: edk2-devel@lists.01.org
> Cc: Zeng, Star <star.zeng@intel.com>; Kinney, Michael D
> <michael.d.kinney@intel.com>; Gao, Liming
> <liming.gao@intel.com>
> Subject: [PATCH 0/2] UefiLib: Free HandleBuffer for
> error path in EfiLocateProtocolBuffer().
> 
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> 
> Star Zeng (2):
>   MdePkg UefiLib: Fix in EfiLocateProtocolBuffer()
>   IntelFrameworkPkg FrameworkUefiLib: Fix in
> EfiLocateProtocolBuffer()
> 
>  IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLib.c |
> 4 ++++
>  MdePkg/Library/UefiLib/UefiLib.c                     |
> 4 ++++
>  2 files changed, 8 insertions(+)
> 
> --
> 2.7.0.windows.1



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-06-04 21:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-04 10:10 [PATCH 0/2] UefiLib: Free HandleBuffer for error path in EfiLocateProtocolBuffer() Star Zeng
2018-06-04 10:10 ` [PATCH 1/2] MdePkg UefiLib: Fix " Star Zeng
2018-06-04 10:10 ` [PATCH 2/2] IntelFrameworkPkg FrameworkUefiLib: " Star Zeng
2018-06-04 21:50 ` [PATCH 0/2] UefiLib: Free HandleBuffer for error path " Kinney, Michael D

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox