mirror of https://github.com/acidanthera/audk.git
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>
This commit is contained in:
parent
076947cfce
commit
bdf5f73120
|
@ -113,6 +113,7 @@ CFormPkg::CFormPkg (
|
||||||
}
|
}
|
||||||
BufferStart = new CHAR8[BufferSize];
|
BufferStart = new CHAR8[BufferSize];
|
||||||
if (BufferStart == NULL) {
|
if (BufferStart == NULL) {
|
||||||
|
delete Node;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
BufferEnd = BufferStart + BufferSize;
|
BufferEnd = BufferStart + BufferSize;
|
||||||
|
|
Loading…
Reference in New Issue