[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220211114031.54f4f143@hermes.local>
Date: Fri, 11 Feb 2022 11:40:31 -0800
From: Stephen Hemminger <stephen@...workplumber.org>
To: Maxim Petrov <mmrmaximuzz@...il.com>
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH iproute2] libnetlink: fix socket leak in
rtnl_open_byproto()
On Tue, 8 Feb 2022 20:20:45 +0300
Maxim Petrov <mmrmaximuzz@...il.com> wrote:
> rtnl_open_byproto() does not close the opened socket in case of errors, and the
> socket is returned to the caller in the `fd` field of the struct. However, none
> of the callers care about the socket, so close it in the function immediately to
> avoid any potential resource leaks.
>
> Signed-off-by: Maxim Petrov <mmrmaximuzz@...il.com>
Applied with reindent of commit message.
Checkpatch was complaining about long lines.
Powered by blists - more mailing lists