mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 10:51:54 -04:00
Fix thermal device list cleanup on early exits
This commit is contained in:
parent
f09091a4e4
commit
7eaec5ca70
1 changed files with 3 additions and 2 deletions
|
|
@ -176,11 +176,11 @@ void state_thermal(struct snapraid_state* state, time_t now)
|
|||
|
||||
/* on error, just disable thermal gathering */
|
||||
if (ret != 0)
|
||||
return;
|
||||
goto bail;
|
||||
|
||||
/* if the list is empty, it's not supported in this platform */
|
||||
if (tommy_list_empty(&low))
|
||||
return;
|
||||
goto bail;
|
||||
|
||||
/* report new attribute */
|
||||
state_attr(state, &low);
|
||||
|
|
@ -289,6 +289,7 @@ void state_thermal(struct snapraid_state* state, time_t now)
|
|||
log_tag("thermal:highest:%d\n", highest_temperature);
|
||||
log_flush();
|
||||
|
||||
bail:
|
||||
tommy_list_foreach(&high, free);
|
||||
tommy_list_foreach(&low, free);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue