From bdf5f73120b6db1b598a6ac7f17a9d5f6cca7c35 Mon Sep 17 00:00:00 2001 From: Hao Wu Date: Tue, 11 Oct 2016 15:25:32 +0800 Subject: [PATCH] BaseTools/VfrCompile: Fix potential memory leak Cc: Liming Gao Cc: Yonghong Zhu Cc: Eric Dong Cc: Dandan Bi Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu Reviewed-by: Liming Gao --- BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp b/BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp index d06c1bc96a..ec73529c20 100644 --- a/BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp +++ b/BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp @@ -113,6 +113,7 @@ CFormPkg::CFormPkg ( } BufferStart = new CHAR8[BufferSize]; if (BufferStart == NULL) { + delete Node; return; } BufferEnd = BufferStart + BufferSize;