mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-08 18:57:22 +00:00
xfrm: cleanup error path in xfrm_add_policy()
Replace the open-coded manual cleanup in the error path of xfrm_add_policy() with xfrm_policy_destroy(), which already handles all the necessary cleanup internally. This is consistent with how xfrm_policy_construct() handles its own error paths. The walk.dead flag must be set before calling xfrm_policy_destroy() as required by BUG_ON(!policy->walk.dead). Signed-off-by: Deepanshu Kartikey <kartikey406@gmail.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
This commit is contained in:
parent
790ead9394
commit
a77d172177
1 changed files with 2 additions and 3 deletions
Loading…
Add table
Add a link
Reference in a new issue