DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] power: fix resource leak by open file pointers
@ 2022-10-12  8:29 Tadhg Kearney
  2022-10-17  8:37 ` Pattan, Reshma
  2022-11-04 16:23 ` [PATCH] power: fix double free of opened files Tadhg Kearney
  0 siblings, 2 replies; 6+ messages in thread
From: Tadhg Kearney @ 2022-10-12  8:29 UTC (permalink / raw)
  To: dev; +Cc: david.hunt, anatoly.burakov, reshma.pattan, Tadhg Kearney

Close file pointers to Intel uncore sysfiles.

Coverity issue: 381400 381397
Fixes: 60b8a661a957 ("power: add Intel uncore frequency control")
CC: david.hunt@intel.com

Signed-off-by: Tadhg Kearney <tadhg.kearney@intel.com>
---
 lib/power/rte_power_intel_uncore.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/power/rte_power_intel_uncore.c b/lib/power/rte_power_intel_uncore.c
index 3afe8feffa..f86e1c8b7a 100644
--- a/lib/power/rte_power_intel_uncore.c
+++ b/lib/power/rte_power_intel_uncore.c
@@ -192,6 +192,11 @@ power_init_for_setting_uncore_freq(struct uncore_power_info *ui)
 	ui->init_max_freq = base_max_freq;
 	ui->init_min_freq = base_min_freq;
 
+	fclose(f_base_min);
+	fclose(f_base_max);
+	fclose(f_max);
+	fclose(f_min);
+
 	return 0;
 
 err:
-- 
2.25.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-11-14 10:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-12  8:29 [PATCH] power: fix resource leak by open file pointers Tadhg Kearney
2022-10-17  8:37 ` Pattan, Reshma
2022-10-26 21:30   ` Thomas Monjalon
2022-11-04 16:23 ` [PATCH] power: fix double free of opened files Tadhg Kearney
2022-11-07  9:17   ` Pattan, Reshma
2022-11-14 10:00     ` David Marchand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).