BaseTools/VfrCompile: Avoid freeing memory with mismatched functions
Memory allocated by operator new[] should be freed using delete[] to avoid possible 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:
@ -2,7 +2,7 @@
|
||||
|
||||
VfrCompiler error handler.
|
||||
|
||||
Copyright (c) 2004 - 2013, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@ -145,7 +145,7 @@ SVfrFileScopeRecord::~SVfrFileScopeRecord (
|
||||
)
|
||||
{
|
||||
if (mFileName != NULL) {
|
||||
delete mFileName;
|
||||
delete[] mFileName;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user