mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Fix a leaked file in HyphTool.cpp.
This addresses the following cppcheck reports: [frameworks/minikin/app/HyphTool.cpp:30]: (error) Resource leak: f [frameworks/minikin/app/HyphTool.cpp:32]: (error) Resource leak: f Change-Id: I5113e0a7268bd3a45bf1498fd023042d9dfe2b87
This commit is contained in:
parent
4c4b6220f1
commit
7739573616
@ -24,6 +24,7 @@ Hyphenator* loadHybFile(const char* fn) {
|
||||
}
|
||||
uint8_t* buf = new uint8_t[size];
|
||||
size_t read_size = fread(buf, 1, size, f);
|
||||
fclose(f);
|
||||
if (read_size < size) {
|
||||
fprintf(stderr, "error reading %s\n", fn);
|
||||
delete[] buf;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user