From: Tadhg Kearney <tadhg.kearney@intel.com>
To: dev@dpdk.org
Cc: david.hunt@intel.com, anatoly.burakov@intel.com,
reshma.pattan@intel.com, chris.macnamara@intel.com,
Tadhg Kearney <tadhg.kearney@intel.com>
Subject: [PATCH] power: fix double free of opened files
Date: Fri, 4 Nov 2022 16:23:53 +0000 [thread overview]
Message-ID: <20221104162353.187145-1-tadhg.kearney@intel.com> (raw)
In-Reply-To: <20221012082928.2171562-1-tadhg.kearney@intel.com>
Fix double free of f_min and f_max by reverting the flcose() for f_min
and f_max. As f_min and f_max are stored for further use and closed in
uncore deinitialization.
Fixes: b127e74 ("power: fix open file descriptors leak")
Signed-off-by: Tadhg Kearney <tadhg.kearney@intel.com>
---
lib/power/rte_power_intel_uncore.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/lib/power/rte_power_intel_uncore.c b/lib/power/rte_power_intel_uncore.c
index f86e1c8b7a..3b8724385f 100644
--- a/lib/power/rte_power_intel_uncore.c
+++ b/lib/power/rte_power_intel_uncore.c
@@ -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;
--
2.25.1
next prev parent reply other threads:[~2022-11-04 16:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Tadhg Kearney [this message]
2022-11-07 9:17 ` [PATCH] power: fix double free of opened files Pattan, Reshma
2022-11-14 10:00 ` David Marchand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221104162353.187145-1-tadhg.kearney@intel.com \
--to=tadhg.kearney@intel.com \
--cc=anatoly.burakov@intel.com \
--cc=chris.macnamara@intel.com \
--cc=david.hunt@intel.com \
--cc=dev@dpdk.org \
--cc=reshma.pattan@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).