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

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: Eric Dong <eric.dong@intel.com>
This commit is contained in:
Dandan Bi 2018-04-10 15:21:40 +08:00 committed by Liming Gao
parent 2aa9a9f03e
commit 7ac4250e87
1 changed files with 8 additions and 4 deletions

View File

@ -3040,7 +3040,8 @@ CVfrQuestionDB::RegisterNewDateQuestion (
for (Index = 0; Index < 3; Index++) {
if (VarIdStr[Index] != NULL) {
delete VarIdStr[Index];
delete[] VarIdStr[Index];
VarIdStr[Index] = NULL;
}
}
@ -3057,7 +3058,8 @@ Err:
}
if (VarIdStr[Index] != NULL) {
delete VarIdStr[Index];
delete[] VarIdStr [Index];
VarIdStr [Index] = NULL;
}
}
}
@ -3216,7 +3218,8 @@ CVfrQuestionDB::RegisterNewTimeQuestion (
for (Index = 0; Index < 3; Index++) {
if (VarIdStr[Index] != NULL) {
delete VarIdStr[Index];
delete[] VarIdStr[Index];
VarIdStr[Index] = NULL;
}
}
@ -3233,7 +3236,8 @@ Err:
}
if (VarIdStr[Index] != NULL) {
delete VarIdStr[Index];
delete[] VarIdStr[Index];
VarIdStr[Index] = NULL;
}
}
}