diff options
Diffstat (limited to 'failsafe.c')
-rw-r--r-- | failsafe.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -5,6 +5,7 @@ #include "cputemp2maxfreq.h" #include "cpufreq.h" #include "logger.h" +#include "cpulist.h" extern struct s_cpudata cpudata; extern struct s_config config; @@ -21,6 +22,7 @@ void failsafe(int code) if (cpufreq_set_long_int("scaling_max_freq",cpudata.min_freq,100)>0) { config.logger("Set scaling frequency to CPU's minimum frequency"); + cpulist_free(); exit(code); } config.logger("Failed to set scaling frequency to CPU's minimum frequency, error: %d (%s)",errno,strerror(errno)); @@ -29,6 +31,7 @@ void failsafe(int code) if (cpufreq_set_long_int("scaling_max_freq",config.fallback_freq,100)>0) { config.logger("Set scaling frequency to fallback frequency"); + cpulist_free(); exit(code); } config.logger("Failed to set scaling frequency to fallback frequency, error: %d (%s)",errno,strerror(errno)); @@ -40,5 +43,6 @@ void failsafe(int code) config.logger("Keeping current state due to -k option"); } + cpulist_free(); exit(code); } |