aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorColin Ian King <[email protected]>2022-04-26 14:16:07 +0100
committerLen Brown <[email protected]>2022-07-28 14:23:25 -0400
commit5e5fd36c58d6c820f7292ee492c3731c9a104a41 (patch)
treea7088b4fa84edd0a004fa549f68f50512d09469c /tools/perf/scripts/python/bin
parente13da9a1dbe4c97431286660ec35eceb50003bb3 (diff)
tools/power turbostat: Fix file pointer leak
Currently if a fscanf fails then an early return leaks an open file pointer. Fix this by fclosing the file before the return. Detected using static analysis with cppcheck: tools/power/x86/turbostat/turbostat.c:2039:3: error: Resource leak: fp [resourceLeak] Fixes: eae97e053fe3 ("tools/power turbostat: Support thermal throttle count print") Signed-off-by: Colin Ian King <[email protected]> Acked-by: Chen Yu <[email protected]> Reviewed-by: Tom Rix <[email protected]> Signed-off-by: Len Brown <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions