[PATCH POWERTOP] Fix various resource leaks

2014-06-26 Thread Mohammad Merajul Islam Molla
Fixes some resource leaks detected by valgrind and coverity scan. diff --git a/src/devices/ahci.cpp b/src/devices/ahci.cpp index ac06460..7f704b6 100644 --- a/src/devices/ahci.cpp +++ b/src/devices/ahci.cpp @@ -64,8 +64,10 @@ static string disk_name(char *path, char *target, char *shortname)

[PATCH POWERTOP] Remove temporary file created during calibration

2014-06-26 Thread Mohammad Merajul Islam Molla
powertop creates temporary file in /tmp folder during calibration. Simply closing does not remove these files. Instead use unlink to remove the file. diff --git a/src/calibrate/calibrate.cpp b/src/calibrate/calibrate.cpp index db368e0..1336c3f 100644 --- a/src/calibrate/calibrate.cpp +++ b/src/cal