power: fix double free of opened files
Fix double free of f_min and f_max by reverting the fclose() for f_min
and f_max. As f_min and f_max are stored for further use and closed in
uncore deinitialization.
Fixes: b127e74cce
("power: fix open file descriptors leak")
Signed-off-by: Tadhg Kearney <tadhg.kearney@intel.com>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
This commit is contained in:
parent
58794bf8d2
commit
08aa805a0b
@ -194,8 +194,7 @@ power_init_for_setting_uncore_freq(struct uncore_power_info *ui)
|
||||
|
||||
fclose(f_base_min);
|
||||
fclose(f_base_max);
|
||||
fclose(f_max);
|
||||
fclose(f_min);
|
||||
/* f_min and f_max are stored, no need to close */
|
||||
|
||||
return 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user