[PATCH v1] drivers: use free_netdev before return
Anton Ivanov
anton.ivanov at cambridgegreys.com
Mon Jul 3 03:12:36 PDT 2023
On 03/07/2023 10:41, Minjie Du wrote:
> We fixed a bug where the variable dev
> was not freed before return.
>
> Signed-off-by: Minjie Du <duminjie at vivo.com>
> ---
> arch/um/drivers/vector_kern.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/um/drivers/vector_kern.c b/arch/um/drivers/vector_kern.c
> index 131b7cb29..af7f6fd4c 100644
> --- a/arch/um/drivers/vector_kern.c
> +++ b/arch/um/drivers/vector_kern.c
> @@ -1655,6 +1655,7 @@ static void vector_eth_configure(
> return;
>
> out_undo_user_init:
undo_user_init looks like an orphan from older code versions.
It should go away completely - jump to out_free_netdev instead.
> + free_netdev(dev);
> return;
> out_free_netdev:
> free_netdev(dev);
--
Anton R. Ivanov
Cambridgegreys Limited. Registered in England. Company Number 10273661
https://www.cambridgegreys.com/
More information about the linux-um
mailing list