BaseTool/VfrCompile: make delete[] match with new[]

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=764

Cc: Eric Dong <eric.dong@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
Bi, Dandan
2018-02-27 13:53:46 +08:00
committed by Liming Gao
parent 0a4f2d4869
commit f7e9858102
5 changed files with 22 additions and 22 deletions

View File

@ -2,7 +2,7 @@
Vfr common library functions.
Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2004 - 2018, 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
@ -360,7 +360,7 @@ CVfrBufferConfig::Write (
case 'i' : // set info
if (mItemListPos->mId != NULL) {
delete mItemListPos->mId;
delete[] mItemListPos->mId;
}
mItemListPos->mId = NULL;
if (Id != NULL) {
@ -1630,7 +1630,7 @@ SVfrVarStorageNode::~SVfrVarStorageNode (
}
if (mVarStoreType == EFI_VFR_VARSTORE_NAME) {
delete mStorageInfo.mNameSpace.mNameTable;
delete[] mStorageInfo.mNameSpace.mNameTable;
}
}
@ -3489,7 +3489,7 @@ CVfrStringDB::CVfrStringDB ()
CVfrStringDB::~CVfrStringDB ()
{
if (mStringFileName != NULL) {
delete mStringFileName;
delete[] mStringFileName;
}
mStringFileName = NULL;
}