Skip to content

cpupower: fix resource leaks and unit labels

Kaushlendra Kumar linux-pm 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3cpupower: fix swapped power/energy unit labelstools/power/cpupower/utils/powercap-info.c+2 -21 reply
2/3cpupower: Fix memory leaks on early exit pathstools/power/cpupower/utils/cpupower.c+16 -62 replies
3/3cpupower: fix memory leak on execlp failuretools/power/cpupower/utils/cpupower.c+3 -01 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] cpupower: fix resource leaks and unit labels

This series addresses multiple resource management issues in cpupower utilities:

- Patch 1 corrects swapped unit descriptions in powercap output where power_uw and energy_uj labels were interchanged.

- Patch 2 centralizes cleanup logic to ensure bitmask resources are freed on all exit paths in the main program.

- Patch 3 fixes a memory leak in print_man_page() when execlp fails.

Kaushlendra Kumar (3):
cpupower: fix swapped power/energy unit labels
cpupower: Fix memory leaks on early exit paths
cpupower: fix memory leak on execlp failure

 tools/power/cpupower/utils/cpupower.c      | 25 ++++++++++++++++------
 tools/power/cpupower/utils/powercap-info.c |  4 ++--
 2 files changed, 21 insertions(+), 8 deletions(-)
Signature · 1 line
2.34.1