summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMalaya Kumar Rout <mrout@redhat.com>2026-01-15 15:33:33 +0530
committerSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>2026-01-16 16:03:21 -0800
commit56c17ee151c6e1a73d77e15b82a8e2130cd8dd16 (patch)
treeb9b0aadb299134900c4f897c36cee0819d642efd /include
parent21adcd5ec99f342489a49e9d237a987b1bd9fab5 (diff)
tools/power/x86/intel-speed-select: Fix file descriptor leak in isolate_cpus()
The file descriptor opened in isolate_cpus() when (!level) is true was not being closed before returning, causing a file descriptor leak in both the error path and the success path. When write() fails at line 950, the function returns at line 953 without closing the file descriptor. Similarly, on success, the function returns at line 956 without closing the file descriptor. Add close(fd) calls before both return statements to fix the resource leak. This follows the same pattern used elsewhere in the same function where file descriptors are properly closed before returning (see lines 1005 and 1027). Fixes: 997074df658e ("tools/power/x86/intel-speed-select: Use cgroup v2 isolation") Signed-off-by: Malaya Kumar Rout <mrout@redhat.com> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions