[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a79bed83-8a43-4ed8-94d4-542b7285835e@web.de>
Date: Tue, 30 Dec 2025 10:42:22 +0100
From: Markus Elfring <Markus.Elfring@....de>
To: Jianhao Xu <jianhao.xu@....edu.cn>, Zilin Guan <zilin@....edu.cn>,
netdev@...r.kernel.org
Cc: LKML <linux-kernel@...r.kernel.org>, kernel-janitors@...r.kernel.org,
Andrew Lunn <andrew+netdev@...n.ch>, "David S. Miller"
<davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Johannes Berg <johannes@...solutions.net>,
Loic Poulain <loic.poulain@....qualcomm.com>, Paolo Abeni
<pabeni@...hat.com>, Sergey Ryazanov <ryazanov.s.a@...il.com>
Subject: Re: [PATCH net] net: wwan: iosm: Fix memory leak in ipc_mux_deinit()
>> …
>>> +++ b/drivers/net/wwan/iosm/iosm_ipc_mux.c
>>> @@ -456,6 +456,7 @@ void ipc_mux_deinit(struct iosm_mux *ipc_mux)
>>> struct sk_buff_head *free_list;
>>> union mux_msg mux_msg;
>>> struct sk_buff *skb;
>>> + int i;
>> …
>>
>> May this variable be defined in the loop header instead?
…
> Thanks for the suggestion.
>
> I would prefer to keep the declaration at the top of the block
Do you tend to interpret such information still as the beginning
of the function implementation?
> to maintain
> consistency with the existing coding style of this function and to keep
> the patch focused strictly on the fix.
Would the mentioned variable be relevant only for an additional if branch?
Regards,
Markus
Powered by blists - more mailing lists