Steffen Klassert 57f7ed25bd xfrm: Fix error reporting in xfrm_state_construct.
[ Upstream commit 6fd06963fa74197103cdbb4b494763127b3f2f34 ]

When memory allocation for XFRMA_ENCAP or XFRMA_COADDR fails,
the error will not be reported because the -ENOMEM assignment
to the err variable is overwritten before. Fix this by moving
these two in front of the function so that memory allocation
failures will be reported.

Reported-by: Tobias Brunner <tobias@strongswan.org>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-07-19 09:44:49 +02:00
..
2021-04-07 15:00:08 +02:00
2021-06-03 09:00:50 +02:00
2020-08-27 07:55:59 -07:00
2021-07-14 16:56:32 +02:00
2021-07-14 16:56:23 +02:00
2021-06-18 10:00:06 +02:00