fix mem leak
This commit is contained in:
parent
9414c6c558
commit
a7d2cd38cf
|
@ -181,6 +181,7 @@ char *ReadFile(const char *file, size_t *size) {
|
||||||
if (goffset < 0) {
|
if (goffset < 0) {
|
||||||
MS_LOG(ERROR) << "read file range failed";
|
MS_LOG(ERROR) << "read file range failed";
|
||||||
ifs->close();
|
ifs->close();
|
||||||
|
delete ifs;
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
*size = static_cast<size_t>(goffset);
|
*size = static_cast<size_t>(goffset);
|
||||||
|
|
Loading…
Reference in New Issue