commit | 3d664f1fb4aa262506b8debcf59169c812f87651 | [log] [tgz] |
---|---|---|
author | Greg Kaiser <gkaiser@google.com> | Thu Mar 29 17:14:32 2018 +0000 |
committer | android-build-merger <android-build-merger@google.com> | Thu Mar 29 17:14:32 2018 +0000 |
tree | 099213b08460734b305c1fda7e9305ce65b0dccb | |
parent | b1c8c8d4c4582ec758f10db6f7f31b16a8a080e0 [diff] | |
parent | 739d7864e3ab0874efa61bfdde41155e8c8c6952 [diff] |
Merge "tools/bit: Avoid leak in error condition" am: db43124b01 am: b3851d92ce am: 739d7864e3 Change-Id: I2ba292aade2c3612b4876af099b9b72fffb45db2
diff --git a/tools/bit/util.cpp b/tools/bit/util.cpp index 9223931..a502a9d 100644 --- a/tools/bit/util.cpp +++ b/tools/bit/util.cpp
@@ -241,6 +241,8 @@ char* buf = (char*)malloc(size); if ((size_t) size != fread(buf, 1, size, file)) { + free(buf); + fclose(file); return string(); }