X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=BaseTools%2FSource%2FC%2FVfrCompile%2FVfrUtilityLib.cpp;fp=BaseTools%2FSource%2FC%2FVfrCompile%2FVfrUtilityLib.cpp;h=1afa5a2590a1ede8a710ec4bb1e752a39d9d2bde;hp=24b0bfa6fd9a0aee4b679781a27b5049b8bb500c;hb=fd5425230ed22872126b52f22a7294e352ca3349;hpb=a6ac965bca117ef33b38a96c36643b36757b7698 diff --git a/BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp b/BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp index 24b0bfa6fd..1afa5a2590 100644 --- a/BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp +++ b/BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp @@ -123,7 +123,7 @@ SConfigInfo::~SConfigInfo ( VOID ) { - BUFFER_SAFE_FREE (mValue); + ARRAY_SAFE_FREE (mValue); } SConfigItem::SConfigItem ( @@ -200,9 +200,9 @@ SConfigItem::~SConfigItem ( { SConfigInfo *Info; - BUFFER_SAFE_FREE (mName); - BUFFER_SAFE_FREE (mGuid); - BUFFER_SAFE_FREE (mId); + ARRAY_SAFE_FREE (mName); + ARRAY_SAFE_FREE (mGuid); + ARRAY_SAFE_FREE (mId); while (mInfoStrList != NULL) { Info = mInfoStrList; mInfoStrList = mInfoStrList->mNext; @@ -1393,7 +1393,7 @@ SVfrVarStorageNode::~SVfrVarStorageNode ( ) { if (mVarStoreName != NULL) { - delete mVarStoreName; + delete[] mVarStoreName; } if (mVarStoreType == EFI_VFR_VARSTORE_NAME) { @@ -2102,7 +2102,7 @@ SVfrDefaultStoreNode::~SVfrDefaultStoreNode ( ) { if (mRefName != NULL) { - delete mRefName; + delete[] mRefName; } } @@ -2304,7 +2304,7 @@ SVfrRuleNode::~SVfrRuleNode ( ) { if (mRuleName != NULL) { - delete mRuleName; + delete[] mRuleName; } } @@ -2523,11 +2523,11 @@ SVfrQuestionNode::~SVfrQuestionNode ( ) { if (mName != NULL) { - delete mName; + delete[] mName; } if (mVarIdStr != NULL) { - delete mVarIdStr; + delete[] mVarIdStr; } } @@ -3387,7 +3387,7 @@ CVfrStringDB::GetVarStoreNameFormStringId ( // Check the String package. // if (PkgHeader->Header.Type != EFI_HII_PACKAGE_STRINGS) { - delete StringPtr; + delete[] StringPtr; return NULL; } @@ -3414,7 +3414,7 @@ CVfrStringDB::GetVarStoreNameFormStringId ( // Status = FindStringBlock(Current, StringId, &NameOffset, &BlockType); if (Status != EFI_SUCCESS) { - delete StringPtr; + delete[] StringPtr; return NULL; } @@ -3447,7 +3447,7 @@ CVfrStringDB::GetVarStoreNameFormStringId ( break; } - delete StringPtr; + delete[] StringPtr; return VarStoreName; }