[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240207200823.7229-1-maks.mishinFZ@gmail.com>
Date: Wed, 7 Feb 2024 23:08:23 +0300
From: Maks Mishin <maks.mishinfz@...il.com>
To: Stephen Hemminger <stephen@...workplumber.org>
Cc: Maks Mishin <maks.mishinFZ@...il.com>,
netdev@...r.kernel.org
Subject: [PATCH] genl: Fix descriptor leak in get_genl_kind()
Signed-off-by: Maks Mishin <maks.mishinFZ@...il.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
Powered by blists - more mailing lists