commit | f7e0b5185e537673c4b18036037db97dd9ec8683 | [log] [tgz] |
---|---|---|
author | liuchao <liuchao741@huawei.com> | Tue Nov 22 16:29:40 2016 +0000 |
committer | android-build-merger <android-build-merger@google.com> | Tue Nov 22 16:29:40 2016 +0000 |
tree | 1aa563fdd57cff75e2c7cdc76703e23cdd3a804d | |
parent | cc673382386204e6c677c637e6c26f2835812f1d [diff] | |
parent | 903044c6673022773ce871ab3e4629b84bbcdeef [diff] |
Merge "Add else branch to avoide fclose(NULL)" am: 10b043bb13 am: dded161774 am: 903044c667 Change-Id: If917dbb56d4cc2758d7b29eee60ae3036d13118a
diff --git a/modules/thermal/thermal.c b/modules/thermal/thermal.c index 6ba5845..7f4de3b 100644 --- a/modules/thermal/thermal.c +++ b/modules/thermal/thermal.c
@@ -138,8 +138,9 @@ fclose(file); fclose(cpu_file); return errno ? -errno : -EIO; + } else { + fclose(cpu_file); } - fclose(cpu_file); if (list != NULL) { list[size] = (cpu_usage_t) {