[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <62c4934a-5db0-45c0-a600-fce2530b50ae@web.de>
Date: Mon, 26 Jan 2026 10:30:16 +0100
From: Markus Elfring <Markus.Elfring@....de>
To: Zilin Guan <zilin@....edu.cn>, linux-rdma@...r.kernel.org,
Leon Romanovsky <leon@...nel.org>
Cc: LKML <linux-kernel@...r.kernel.org>, Jason Gunthorpe <jgg@...pe.ca>,
Jianhao Xu <jianhao.xu@....edu.cn>, Yishai Hadas <yishaih@...dia.com>
Subject: Re: [PATCH] RDMA/mlx5: Fix memory leak in GET_DATA_DIRECT_SYSFS_PATH
handler
…
> 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
Powered by blists - more mailing lists