diff options
| author | Len Brown <len.brown@intel.com> | 2026-05-03 15:23:25 -0400 |
|---|---|---|
| committer | Len Brown <len.brown@intel.com> | 2026-05-24 10:26:21 -0400 |
| commit | 1b2903a459718e12fb81b41db900d719eb953f02 (patch) | |
| tree | 894c69816bdacf12866cf7021ed2f732cbefc7f3 /scripts/stackusage | |
| parent | 217fef8a26da7527b2b81c5fd285666393c4e00f (diff) | |
| download | linux-next-1b2903a459718e12fb81b41db900d719eb953f02.tar.gz linux-next-1b2903a459718e12fb81b41db900d719eb953f02.zip | |
tools/power turbostat: Fix PMT error path fd handling
It is possible to leak a file descriptor if a diretory
open succeeds, but the scan fails. Close the fd on error.
Also, on cleanup, check for NULL fd.
Assisted-by: Claude: Claude Sonnet 4.6
Fixes: 4265a86582eaa2 ("tools/power turbostat: Add PMT directory iterator helper")
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'scripts/stackusage')
0 files changed, 0 insertions, 0 deletions
