fix mem leak

This commit is contained in:
jianghui58 2022-11-21 10:12:48 +08:00
parent 9414c6c558
commit a7d2cd38cf
1 changed files with 1 additions and 0 deletions

View File

@ -181,6 +181,7 @@ char *ReadFile(const char *file, size_t *size) {
if (goffset < 0) {
MS_LOG(ERROR) << "read file range failed";
ifs->close();
delete ifs;
return nullptr;
}
*size = static_cast<size_t>(goffset);