Re: [PATCH] xtensa: ISS: fix etherdev leak in error return path

From: Max Filippov
Date: Mon Jul 03 2023 - 13:11:44 EST


On Mon, Jul 3, 2023 at 9:02 AM Markus Elfring <Markus.Elfring@xxxxxx> wrote:
>
> > > We fixed a bug where the variable dev
> > > was not freed before return.
>
> > > arch/xtensa/platforms/iss/network.c | 1 +
>
> > Applied to my xtensa tree with the following commit message:
> >
> > xtensa: ISS: fix etherdev leak in error return path
> >
> > iss_net_configure frees etherdev in all error return paths except one
> > where register_netdevice fails. Add missing free_netdev to that path.
>
> * Did you add the tag “Fixes” because of the completed resource cleanup
> for the implementation of the function “iss_net_configure”?
>
> * How do you think about to replace any statements by the source code
> “goto err_free_netdev;” here?

I've scrapped that patch and committed the other one instead. See

https://lore.kernel.org/lkml/CAMo8BfKe1nR+UP1WiUWFX0E7GSEfHsF8bZapsUYu3NFTnA8_AQ@xxxxxxxxxxxxxx/
https://lore.kernel.org/lkml/20230703170335.1340104-1-jcmvbkbc@xxxxxxxxx/

--
Thanks.
-- Max