\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
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
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
\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
- delete mOptions.CPreprocessorOptions;\r
+ delete[] mOptions.CPreprocessorOptions;\r
mOptions.CPreprocessorOptions = NULL;\r
}\r
\r
}\r
\r
if (gCBuffer.Buffer != NULL) {\r
- delete gCBuffer.Buffer;\r
+ delete[] gCBuffer.Buffer;\r
}\r
\r
if (gRBuffer.Buffer != NULL) {\r
- delete gRBuffer.Buffer;\r
+ delete[] gRBuffer.Buffer;\r
}\r
\r
return GetUtilityStatus ();\r
SVfrFileScopeRecord *pNode = NULL;\r
\r
if (mInputFileName != NULL) {\r
- delete mInputFileName;\r
+ delete[] mInputFileName;\r
}\r
\r
while (mScopeRecordListHead != NULL) {\r
pBNode = mBufferNodeQueueHead;\r
mBufferNodeQueueHead = mBufferNodeQueueHead->mNext;\r
if (pBNode->mBufferStart != NULL) {\r
- delete pBNode->mBufferStart;\r
+ delete[] pBNode->mBufferStart;\r
delete pBNode;\r
}\r
}\r
SIfrRecord *pNode; \r
\r
if (TBuffer.Buffer != NULL) {\r
- delete TBuffer.Buffer;\r
+ delete[] TBuffer.Buffer;\r
}\r
\r
TBuffer.Size = 0;\r
// update bin buffer to package data buffer\r
//\r
if (mObjBinBuf != NULL) {\r
- delete mObjBinBuf;\r
+ delete[] mObjBinBuf;\r
mObjBinBuf = ObjBinBuf;\r
}\r
\r
break;\r
}\r
}\r
- if (TFName != NULL) { delete TFName; TFName = NULL; }\r
+ if (TFName != NULL) { delete[] TFName; TFName = NULL; }\r
>>\r
)*\r
)\r
VSEObj.SetSize ((UINT16) Size);\r
VSEObj.SetName (StoreName);\r
if (IsUEFI23EfiVarstore == FALSE && StoreName != NULL) {\r
- delete StoreName; \r
+ delete[] StoreName;\r
}\r
>>\r
";"\r
>>\r
<<\r
if (VarIdStr != NULL) {\r
- delete VarIdStr;\r
+ delete[] VarIdStr;\r
}\r
_SAVE_CURRQEST_VARINFO (Info);\r
>>\r
}\r
\r
QuestVarIdStr = VarIdStr;\r
- if (VarStr != NULL) {delete VarStr;}\r
+ if (VarStr != NULL) {delete[] VarStr;}\r
>>\r
)\r
;\r
CIfrGet GObj(L->getLine()); \r
_SAVE_OPHDR_COND (GObj, ($ExpOpCount == 0), L->getLine()); \r
GObj.SetVarInfo (&Info); \r
- delete VarIdStr; \r
+ delete[] VarIdStr;\r
$ExpOpCount++;\r
}\r
>>\r
}\r
CIfrSet TSObj(L->getLine()); \r
TSObj.SetVarInfo (&Info); \r
- delete VarIdStr; \r
+ delete[] VarIdStr;\r
$ExpOpCount++;\r
}\r
>>\r
NewStr[0] = '\0';\r
if (*Dest != NULL) {\r
strcpy (NewStr, *Dest);\r
- delete *Dest;\r
+ delete[] *Dest;\r
}\r
strcat (NewStr, Src);\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
\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
\r
if (mVarStoreType == EFI_VFR_VARSTORE_NAME) {\r
- delete mStorageInfo.mNameSpace.mNameTable;\r
+ delete[] mStorageInfo.mNameSpace.mNameTable;\r
}\r
}\r
\r
CVfrStringDB::~CVfrStringDB ()\r
{\r
if (mStringFileName != NULL) {\r
- delete mStringFileName;\r
+ delete[] mStringFileName;\r
}\r
mStringFileName = NULL;\r
}\r