summaryrefslogtreecommitdiff
path: root/BaseTools/Source
diff options
context:
space:
mode:
authorHao Wu <hao.a.wu@intel.com>2016-10-11 15:25:32 +0800
committerHao Wu <hao.a.wu@intel.com>2016-11-08 16:37:49 +0800
commitbdf5f73120b6db1b598a6ac7f17a9d5f6cca7c35 (patch)
tree05b22d9a6535971ea32b0fee66d81663892d2077 /BaseTools/Source
parent076947cfceaa5c87f18306bd29b22caaa392d2f5 (diff)
downloadedk2-platforms-bdf5f73120b6db1b598a6ac7f17a9d5f6cca7c35.tar.xz
BaseTools/VfrCompile: Fix potential memory leak
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>
Diffstat (limited to 'BaseTools/Source')
-rw-r--r--BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp1
1 files changed, 1 insertions, 0 deletions
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;