Skip to content

A series of patches towards limiting memory leaks

Joe Konno powertop 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest5 patches 1 replyIn review
  2. v28 patches 22 repliesSuperseded

Changes in v3 from the cover letter

* Modified cover letter subject to bring focus to memory leaks
* Removed buffer overflow protection patches, to be re-submitted separately

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5Properly cleaning up the display tabssrc/display.cpp src/display.h+12 -00 replies
2/5Removing a documented memory leaksrc/parameters/parameters.h src/parameters/persistent.cpp+16 -00 replies
3/5Remove another memory leaksrc/tuning/tuning.cpp+7 -00 replies
4/5Mark pretty_print_init as initializedsrc/lib.cpp+2 -00 replies
5/5Adding a clean_shutdown functionsrc/main.cpp+12 -30 replies

Reviews trailers per patch

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

Read the v3 thread

Cover letter [Powertop] [PATCH v3 0/5] A series of patches towards limiting memory leaks

From: Joe Konno <joe.konno(a)intel.com>

Changes since v1:
* Rebased atop "41c54e8 allow none-ncurses messaging..."
* Removed double-free in original patch 3/8

Changes since v2:
* Modified cover letter subject to bring focus to memory leaks
* Removed buffer overflow protection patches, to be re-submitted separately

The three buffer overflow protection patches in the original series from Dan were removed in this submission, leaving only the five (mostly) memory leak patches.

The buffer overflow protection patches, which had been committed (and reverted) before the v2.6 release was tagged, replaced some calls to sprintf(), strcpy(), and friends with their 'n' functions. That alone is insufficient and potentially harmful. Buffer overflow protection deserves consideration appropriate to the privilege level necessary to run PowerTOP.

The remaining five patches from the original series from Dan deal (mostly) with memory leaks.

Sergey and Arjan, thanks for your v2 reviews and discussion!

Dan Kalowsky (5):
Properly cleaning up the display tabs
Removing a documented memory leak
Remove another memory leak
Mark pretty_print_init as initialized
Adding a clean_shutdown function

 src/display.cpp               | 11 +++++++++++
 src/display.h                 |  1 +
 src/lib.cpp                   |  2 ++
 src/main.cpp                  | 15 ++++++++++++---
 src/parameters/parameters.h   |  1 +
 src/parameters/persistent.cpp | 15 +++++++++++++++
 src/tuning/tuning.cpp         |  7 +++++++
 7 files changed, 49 insertions(+), 3 deletions(-)
Signature · 1 line
2.1.2