[edk2] [PATCH] MdeModulePkg DxeCapsuleLibFmp: Free HandleBuffer after it is used

Star Zeng posted 1 patch 5 years, 8 months ago
Failed in applying to current master (apply log)
MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c | 4 ++++
1 file changed, 4 insertions(+)
[edk2] [PATCH] MdeModulePkg DxeCapsuleLibFmp: Free HandleBuffer after it is used
Posted by Star Zeng 5 years, 8 months ago
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
---
 MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c
index a1347b5ce67c..e88dab8c7642 100644
--- a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c
+++ b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c
@@ -610,6 +610,8 @@ DumpAllFmpInfo (
     FreePool(FmpImageInfoBuf);
   }
 
+  FreePool (HandleBuffer);
+
   return ;
 }
 
@@ -741,6 +743,8 @@ GetFmpHandleBufferByType (
     FreePool(FmpImageInfoBuf);
   }
 
+  FreePool (HandleBuffer);
+
   if (MatchedNumberOfHandles == 0) {
     return EFI_NOT_FOUND;
   }
-- 
2.7.0.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH] MdeModulePkg DxeCapsuleLibFmp: Free HandleBuffer after it is used
Posted by Yao, Jiewen 5 years, 8 months ago
Reviewed-by: jiewen.yao@intel.com

thank you!
Yao, Jiewen


> 在 2018年7月30日,下午4:54,Zeng, Star <star.zeng@intel.com> 写道:
> 
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Star Zeng <star.zeng@intel.com>
> ---
> MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c | 4 ++++
> 1 file changed, 4 insertions(+)
> 
> diff --git a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c
> index a1347b5ce67c..e88dab8c7642 100644
> --- a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c
> +++ b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c
> @@ -610,6 +610,8 @@ DumpAllFmpInfo (
>     FreePool(FmpImageInfoBuf);
>   }
> 
> +  FreePool (HandleBuffer);
> +
>   return ;
> }
> 
> @@ -741,6 +743,8 @@ GetFmpHandleBufferByType (
>     FreePool(FmpImageInfoBuf);
>   }
> 
> +  FreePool (HandleBuffer);
> +
>   if (MatchedNumberOfHandles == 0) {
>     return EFI_NOT_FOUND;
>   }
> -- 
> 2.7.0.windows.1
> 
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel