Re: [PATCH] [v2] net: ipv4: fix a memleak in ip_setup_cork

From: Eric Dumazet
Date: Mon Jan 29 2024 - 08:23:18 EST


On Mon, Jan 29, 2024 at 10:23 AM Zhipeng Lu <alexious@xxxxxxxxxx> wrote:
>
> When inetdev_valid_mtu fails, cork->opt should be freed if it is
> allocated in ip_setup_cork. Otherwise there could be a memleak.
>
> Fixes: 501a90c94510 ("inet: protect against too small mtu values.")
> Signed-off-by: Zhipeng Lu <alexious@xxxxxxxxxx>
> ---

Okay, although the changelog is a bit confusing, since we do not free
cork->opt anymore in V2...

Reviewed-by: Eric Dumazet <edumazet@xxxxxxxxxx>