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>
\r
VfrCompiler main class and main function.\r
\r
\r
VfrCompiler main class and main function.\r
\r
-Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
strcat (IncludePaths, " -I ");\r
strcat (IncludePaths, PathStr);\r
if (mOptions.IncludePaths != NULL) {\r
strcat (IncludePaths, " -I ");\r
strcat (IncludePaths, PathStr);\r
if (mOptions.IncludePaths != NULL) {\r
- delete mOptions.IncludePaths;\r
+ delete[] mOptions.IncludePaths;\r
}\r
mOptions.IncludePaths = IncludePaths;\r
}\r
}\r
mOptions.IncludePaths = IncludePaths;\r
}\r
strcat (Opt, " ");\r
strcat (Opt, Options);\r
if (mOptions.CPreprocessorOptions != NULL) {\r
strcat (Opt, " ");\r
strcat (Opt, Options);\r
if (mOptions.CPreprocessorOptions != NULL) {\r
- delete mOptions.CPreprocessorOptions;\r
+ delete[] mOptions.CPreprocessorOptions;\r
}\r
mOptions.CPreprocessorOptions = Opt;\r
}\r
}\r
mOptions.CPreprocessorOptions = Opt;\r
}\r
}\r
\r
if (mOptions.IncludePaths != NULL) {\r
}\r
\r
if (mOptions.IncludePaths != NULL) {\r
- delete mOptions.IncludePaths;\r
+ delete[] mOptions.IncludePaths;\r
mOptions.IncludePaths = NULL;\r
}\r
\r
if (mOptions.CPreprocessorOptions != NULL) {\r
mOptions.IncludePaths = NULL;\r
}\r
\r
if (mOptions.CPreprocessorOptions != NULL) {\r
- delete mOptions.CPreprocessorOptions;\r
+ delete[] mOptions.CPreprocessorOptions;\r
mOptions.CPreprocessorOptions = NULL;\r
}\r
\r
mOptions.CPreprocessorOptions = NULL;\r
}\r
\r
}\r
\r
if (gCBuffer.Buffer != NULL) {\r
}\r
\r
if (gCBuffer.Buffer != NULL) {\r
- delete gCBuffer.Buffer;\r
+ delete[] gCBuffer.Buffer;\r
}\r
\r
if (gRBuffer.Buffer != NULL) {\r
}\r
\r
if (gRBuffer.Buffer != NULL) {\r
- delete gRBuffer.Buffer;\r
+ delete[] gRBuffer.Buffer;\r
}\r
\r
return GetUtilityStatus ();\r
}\r
\r
return GetUtilityStatus ();\r
SVfrFileScopeRecord *pNode = NULL;\r
\r
if (mInputFileName != NULL) {\r
SVfrFileScopeRecord *pNode = NULL;\r
\r
if (mInputFileName != NULL) {\r
- delete mInputFileName;\r
+ delete[] mInputFileName;\r
}\r
\r
while (mScopeRecordListHead != NULL) {\r
}\r
\r
while (mScopeRecordListHead != NULL) {\r
pBNode = mBufferNodeQueueHead;\r
mBufferNodeQueueHead = mBufferNodeQueueHead->mNext;\r
if (pBNode->mBufferStart != NULL) {\r
pBNode = mBufferNodeQueueHead;\r
mBufferNodeQueueHead = mBufferNodeQueueHead->mNext;\r
if (pBNode->mBufferStart != NULL) {\r
- delete pBNode->mBufferStart;\r
+ delete[] pBNode->mBufferStart;\r
SIfrRecord *pNode; \r
\r
if (TBuffer.Buffer != NULL) {\r
SIfrRecord *pNode; \r
\r
if (TBuffer.Buffer != NULL) {\r
- delete TBuffer.Buffer;\r
+ delete[] TBuffer.Buffer;\r
}\r
\r
TBuffer.Size = 0;\r
}\r
\r
TBuffer.Size = 0;\r
// update bin buffer to package data buffer\r
//\r
if (mObjBinBuf != NULL) {\r
// update bin buffer to package data buffer\r
//\r
if (mObjBinBuf != NULL) {\r
mObjBinBuf = ObjBinBuf;\r
}\r
\r
mObjBinBuf = ObjBinBuf;\r
}\r
\r
- if (TFName != NULL) { delete TFName; TFName = NULL; }\r
+ if (TFName != NULL) { delete[] TFName; TFName = NULL; }\r
VSEObj.SetSize ((UINT16) Size);\r
VSEObj.SetName (StoreName);\r
if (IsUEFI23EfiVarstore == FALSE && StoreName != NULL) {\r
VSEObj.SetSize ((UINT16) Size);\r
VSEObj.SetName (StoreName);\r
if (IsUEFI23EfiVarstore == FALSE && StoreName != NULL) {\r
>>\r
<<\r
if (VarIdStr != NULL) {\r
>>\r
<<\r
if (VarIdStr != NULL) {\r
}\r
_SAVE_CURRQEST_VARINFO (Info);\r
>>\r
}\r
_SAVE_CURRQEST_VARINFO (Info);\r
>>\r
}\r
\r
QuestVarIdStr = VarIdStr;\r
}\r
\r
QuestVarIdStr = VarIdStr;\r
- if (VarStr != NULL) {delete VarStr;}\r
+ if (VarStr != NULL) {delete[] VarStr;}\r
CIfrGet GObj(L->getLine()); \r
_SAVE_OPHDR_COND (GObj, ($ExpOpCount == 0), L->getLine()); \r
GObj.SetVarInfo (&Info); \r
CIfrGet GObj(L->getLine()); \r
_SAVE_OPHDR_COND (GObj, ($ExpOpCount == 0), L->getLine()); \r
GObj.SetVarInfo (&Info); \r
$ExpOpCount++;\r
}\r
>>\r
$ExpOpCount++;\r
}\r
>>\r
}\r
CIfrSet TSObj(L->getLine()); \r
TSObj.SetVarInfo (&Info); \r
}\r
CIfrSet TSObj(L->getLine()); \r
TSObj.SetVarInfo (&Info); \r
$ExpOpCount++;\r
}\r
>>\r
$ExpOpCount++;\r
}\r
>>\r
NewStr[0] = '\0';\r
if (*Dest != NULL) {\r
strcpy (NewStr, *Dest);\r
NewStr[0] = '\0';\r
if (*Dest != NULL) {\r
strcpy (NewStr, *Dest);\r
}\r
strcat (NewStr, Src);\r
\r
}\r
strcat (NewStr, Src);\r
\r
\r
Vfr common library functions.\r
\r
\r
Vfr common library functions.\r
\r
-Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
\r
case 'i' : // set info\r
if (mItemListPos->mId != NULL) {\r
\r
case 'i' : // set info\r
if (mItemListPos->mId != NULL) {\r
- delete mItemListPos->mId;\r
+ delete[] mItemListPos->mId;\r
}\r
mItemListPos->mId = NULL;\r
if (Id != NULL) {\r
}\r
mItemListPos->mId = NULL;\r
if (Id != NULL) {\r
}\r
\r
if (mVarStoreType == EFI_VFR_VARSTORE_NAME) {\r
}\r
\r
if (mVarStoreType == EFI_VFR_VARSTORE_NAME) {\r
- delete mStorageInfo.mNameSpace.mNameTable;\r
+ delete[] mStorageInfo.mNameSpace.mNameTable;\r
CVfrStringDB::~CVfrStringDB ()\r
{\r
if (mStringFileName != NULL) {\r
CVfrStringDB::~CVfrStringDB ()\r
{\r
if (mStringFileName != NULL) {\r
- delete mStringFileName;\r
+ delete[] mStringFileName;\r
}\r
mStringFileName = NULL;\r
}\r
}\r
mStringFileName = NULL;\r
}\r