mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-26 23:24:03 +02:00
BaseTool/VfrCompile: Fix potential memory leak issue
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=771 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>
This commit is contained in:
parent
f7e9858102
commit
65e0e10d23
@ -3504,6 +3504,10 @@ CVfrStringDB::SetStringFileName(IN CHAR8 *StringFileName)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mStringFileName != NULL) {
|
||||||
|
delete[] mStringFileName;
|
||||||
|
}
|
||||||
|
|
||||||
FileLen = strlen (StringFileName) + 1;
|
FileLen = strlen (StringFileName) + 1;
|
||||||
mStringFileName = new CHAR8[FileLen];
|
mStringFileName = new CHAR8[FileLen];
|
||||||
if (mStringFileName == NULL) {
|
if (mStringFileName == NULL) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user