netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] genl: Fix descriptor leak in get_genl_kind()
@ 2024-02-07 20:08 Maks Mishin
  2024-02-08 13:22 ` Donald Hunter
  0 siblings, 1 reply; 2+ messages in thread
From: Maks Mishin @ 2024-02-07 20:08 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Maks Mishin, netdev

Signed-off-by: Maks Mishin <maks.mishinFZ@gmail.com>
---
 genl/genl.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/genl/genl.c b/genl/genl.c
index 85cc73bb..74100dad 100644
--- a/genl/genl.c
+++ b/genl/genl.c
@@ -71,6 +71,9 @@ static struct genl_util *get_genl_kind(const char *str)
 	snprintf(buf, sizeof(buf), "%s_genl_util", str);
 
 	f = dlsym(dlh, buf);
+	if (dlh != NULL)
+		dlclose(dlh);
+
 	if (f == NULL)
 		goto noexist;
 reg:
-- 
2.30.2


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

end of thread, other threads:[~2024-02-08 13:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-07 20:08 [PATCH] genl: Fix descriptor leak in get_genl_kind() Maks Mishin
2024-02-08 13:22 ` Donald Hunter

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).