From: Markus Elfring <Markus.Elfring@web.de>
To: Zilin Guan <zilin@seu.edu.cn>,
linux-rdma@vger.kernel.org, Leon Romanovsky <leon@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Jason Gunthorpe <jgg@ziepe.ca>,
Jianhao Xu <jianhao.xu@seu.edu.cn>,
Yishai Hadas <yishaih@nvidia.com>
Subject: Re: [PATCH] RDMA/mlx5: Fix memory leak in GET_DATA_DIRECT_SYSFS_PATH handler
Date: Mon, 26 Jan 2026 10:30:16 +0100 [thread overview]
Message-ID: <62c4934a-5db0-45c0-a600-fce2530b50ae@web.de> (raw)
In-Reply-To: <20260126074801.627898-1-zilin@seu.edu.cn>
…
> Add a kfree() call to the error path to ensure the allocated memory is
> properly freed.
…
How do you think about to use an additional label in the affected if branch instead?
https://elixir.bootlin.com/linux/v6.19-rc5/source/drivers/infiniband/hw/mlx5/std_types.c#L189-L231
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?h=v6.19-rc7#n526
See also once more:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/stable-kernel-rules.rst?h=v6.19-rc7#n34
Regards,
Markus
next prev parent reply other threads:[~2026-01-26 9:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-26 7:48 Zilin Guan
2026-01-26 9:30 ` Markus Elfring [this message]
2026-01-27 14:20 ` Leon Romanovsky
2026-02-27 7:32 ` Markus Elfring
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=62c4934a-5db0-45c0-a600-fce2530b50ae@web.de \
--to=markus.elfring@web.de \
--cc=jgg@ziepe.ca \
--cc=jianhao.xu@seu.edu.cn \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=yishaih@nvidia.com \
--cc=zilin@seu.edu.cn \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®