]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/CapsuleLib: Free the buffer returned by GetVariable2 API
authorHao Wu <hao.a.wu@intel.com>
Fri, 10 Mar 2017 02:22:30 +0000 (10:22 +0800)
committerHao Wu <hao.a.wu@intel.com>
Mon, 13 Mar 2017 01:15:52 +0000 (09:15 +0800)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleReportLib.c

index fc0f8698a9b42b5878a188ad87346792a569dd57..3fed8e06e41bac4e7b02db8a1ad34b632491eceb 100644 (file)
@@ -342,6 +342,10 @@ InitCapsuleLastVariable (
                         0,\r
                         NULL\r
                         );\r
+      } else {\r
+        if (CapsuleResult != NULL) {\r
+          FreePool (CapsuleResult);\r
+        }\r
       }\r
     }\r
 \r