]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools/VfrCompile: Fix potential memory leak
authorHao Wu <hao.a.wu@intel.com>
Tue, 11 Oct 2016 07:25:32 +0000 (15:25 +0800)
committerHao Wu <hao.a.wu@intel.com>
Tue, 8 Nov 2016 08:37:49 +0000 (16:37 +0800)
Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp

index d06c1bc96ab1b720f4fb357283882b9ab3e53a4a..ec73529c2038fd194c8ccc4e806ad6efd5d58bdf 100644 (file)
@@ -113,6 +113,7 @@ CFormPkg::CFormPkg (
   }\r
   BufferStart = new CHAR8[BufferSize];\r
   if (BufferStart == NULL) {\r
   }\r
   BufferStart = new CHAR8[BufferSize];\r
   if (BufferStart == NULL) {\r
+    delete Node;\r
     return;\r
   }\r
   BufferEnd   = BufferStart + BufferSize;\r
     return;\r
   }\r
   BufferEnd   = BufferStart + BufferSize;\r