xfrm: fix a read lock imbalance in make_blackhole
if xfrm_policy_get_afinfo returns 0, it has already released the read lock, xfrm_policy_put_afinfo should not be called again. Signed-off-by: Li RongQing <roy.qing.li@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
1d57f19539
commit
433a195480
1 changed files with 1 additions and 1 deletions
|
@ -1764,7 +1764,7 @@ static struct dst_entry *make_blackhole(struct net *net, u16 family,
|
|||
|
||||
if (!afinfo) {
|
||||
dst_release(dst_orig);
|
||||
ret = ERR_PTR(-EINVAL);
|
||||
return ERR_PTR(-EINVAL);
|
||||
} else {
|
||||
ret = afinfo->blackhole_route(net, dst_orig);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue