[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20240208090521.14c5e230@hermes.local>
Date: Thu, 8 Feb 2024 09:05:21 -0800
From: Stephen Hemminger <stephen@...workplumber.org>
To: Maks Mishin <maks.mishinfz@...il.com>
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH] iplink: Fix descriptor leak in get_link_kind()
On Thu, 8 Feb 2024 00:04:50 +0300
Maks Mishin <maks.mishinfz@...il.com> wrote:
> Found by RASU JSC
>
> Signed-off-by: Maks Mishin <maks.mishinFZ@...il.com>
> ---
> ip/iplink.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/ip/iplink.c b/ip/iplink.c
> index 95314af5..7e31b95c 100644
> --- a/ip/iplink.c
> +++ b/ip/iplink.c
> @@ -168,6 +168,9 @@ struct link_util *get_link_kind(const char *id)
>
> snprintf(buf, sizeof(buf), "%s_link_util", id);
> l = dlsym(dlh, buf);
> + if (dlh != NULL)
> + dlclose(dlh);
> +
> if (l == NULL)
> return NULL;
>
NAK this will break the caching of BODY.
Powered by blists - more mailing lists