Make out-of-memory in computeHash fatal
This commit is contained in:
parent
0a6091eeeb
commit
fcd72581a1
@ -82,9 +82,7 @@ std::string SGFile::computeHash()
|
|||||||
[](char* p) { free(p); }};
|
[](char* p) { free(p); }};
|
||||||
|
|
||||||
if (!buf) {
|
if (!buf) {
|
||||||
// @TODO report out of memory error
|
throw sg_exception("Malloc of SHA buffer failed", {}, file_name);
|
||||||
SG_LOG(SG_IO, SG_ALERT, "Failed to malloc buffer for SHA1 check:" << file_name);
|
|
||||||
return {};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t readLen;
|
size_t readLen;
|
||||||
|
Loading…
Reference in New Issue
Block a user