diff options
author | Dandan Bi <dandan.bi@intel.com> | 2018-04-10 15:21:40 +0800 |
---|---|---|
committer | Liming Gao <liming.gao@intel.com> | 2018-04-17 16:57:00 +0800 |
commit | 7ac4250e872424307c87a1565449a52f3e280953 (patch) | |
tree | bad0474c69965925149cb94325f2ecb4e2a98432 /BaseTools/Source/C/VfrCompile | |
parent | 2aa9a9f03efe31c9646331e009c8d2cb304594b3 (diff) | |
download | edk2-7ac4250e872424307c87a1565449a52f3e280953.tar.gz edk2-7ac4250e872424307c87a1565449a52f3e280953.tar.bz2 edk2-7ac4250e872424307c87a1565449a52f3e280953.zip |
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>
Diffstat (limited to 'BaseTools/Source/C/VfrCompile')
-rw-r--r-- | BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp b/BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp index 5cab7bbfa1..d795ef01bd 100644 --- a/BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp +++ b/BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp @@ -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;
}
}
}
|