From: Stephen Hemminger <stephen@networkplumber.org>
To: Maxim Petrov <mmrmaximuzz@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH iproute2] libnetlink: fix socket leak in rtnl_open_byproto()
Date: Fri, 11 Feb 2022 11:40:31 -0800 [thread overview]
Message-ID: <20220211114031.54f4f143@hermes.local> (raw)
In-Reply-To: <d376d06b-d1e3-c462-3a60-cc2e8ed7a147@gmail.com>
On Tue, 8 Feb 2022 20:20:45 +0300
Maxim Petrov <mmrmaximuzz@gmail.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@gmail.com>
Applied with reindent of commit message.
Checkpatch was complaining about long lines.
prev parent reply other threads:[~2022-02-11 19:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-08 17:20 [PATCH iproute2] libnetlink: fix socket leak in rtnl_open_byproto() Maxim Petrov
2022-02-11 1:19 ` Stephen Hemminger
2022-02-11 18:30 ` Maxim Petrov
2022-02-11 18:35 ` Stephen Hemminger
2022-02-11 19:40 ` Stephen Hemminger [this message]
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=20220211114031.54f4f143@hermes.local \
--to=stephen@networkplumber.org \
--cc=mmrmaximuzz@gmail.com \
--cc=netdev@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.