Commit bd03e762 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Jakub Kicinski
Browse files

rtnetlink: Fix an error handling path in rtnl_newlink()



When some code has been moved in the commit in Fixes, some "return err;"
have correctly been changed in goto <some_where_in_the_error_handling_path>
but this one was missed.

Should "ops->maxtype > RTNL_MAX_TYPE" happen, then some resources would
leak.

Go through the error handling path to fix these leaks.

Fixes: 0d3008d1 ("rtnetlink: Move ops->validate to rtnl_newlink().")
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: default avatarKuniyuki Iwashima <kuniyu@amazon.com>
Link: https://patch.msgid.link/eca90eeb4d9e9a0545772b68aeaab883d9fe2279.1729952228.git.christophe.jaillet@wanadoo.fr


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 1aea2c42
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment