Commit 6a13f5a
xfrm: policy: fix null dereference
Julian Wiedmann says:
> + if (!xfrm_pol_hold_rcu(ret))
Coverity spotted that ^^^ needs a s/ret/pol fix-up:
> CID 1599386: Null pointer dereferences (FORWARD_NULL)
> Passing null pointer "ret" to "xfrm_pol_hold_rcu", which dereferences it.
Ditch the bogus 'ret' variable.
Fixes: 563d5ca ("xfrm: switch migrate to xfrm_policy_lookup_bytype")
Reported-by: Julian Wiedmann <jwiedmann.dev@gmail.com>
Closes: https://lore.kernel.org/netdev/06dc2499-c095-4bd4-aee3-a1d0e3ec87c4@gmail.com/
Signed-off-by: Florian Westphal <fw@strlen.de>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>1 parent 69716a3 commit 6a13f5a
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4429 | 4429 | | |
4430 | 4430 | | |
4431 | 4431 | | |
4432 | | - | |
| 4432 | + | |
4433 | 4433 | | |
4434 | 4434 | | |
4435 | 4435 | | |
| |||
4465 | 4465 | | |
4466 | 4466 | | |
4467 | 4467 | | |
4468 | | - | |
| 4468 | + | |
4469 | 4469 | | |
4470 | 4470 | | |
4471 | 4471 | | |
| |||
0 commit comments