Zhipeng Lu 5dee6d6923 net: ipv4: fix a memleak in ip_setup_cork
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@zju.edu.cn>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/20240129091017.2938835-1-alexious@zju.edu.cn
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-01-31 15:53:25 -08:00
..
2023-10-25 10:38:07 +01:00
2024-01-04 10:23:10 -08:00
2023-10-16 21:05:33 -07:00
2024-01-29 12:07:35 +00:00
2023-09-14 16:16:36 +02:00
2023-08-29 17:39:15 -07:00