diff options
Diffstat (limited to 'tools/bit/util.cpp')
-rw-r--r-- | tools/bit/util.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/bit/util.cpp b/tools/bit/util.cpp index 922393146b10..a502a9dbe736 100644 --- a/tools/bit/util.cpp +++ b/tools/bit/util.cpp @@ -241,6 +241,8 @@ read_file(const string& filename) char* buf = (char*)malloc(size); if ((size_t) size != fread(buf, 1, size, file)) { + free(buf); + fclose(file); return string(); } |