[XFRM]: Always release dst_entry on error in xfrm_lookup
Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
cf0b450cd5
commit
e104411b82
@@ -92,10 +92,7 @@ static inline struct rtable *route_reverse(struct sk_buff *skb,
|
||||
fl.fl_ip_sport = tcph->dest;
|
||||
fl.fl_ip_dport = tcph->source;
|
||||
|
||||
if (xfrm_lookup((struct dst_entry **)&rt, &fl, NULL, 0)) {
|
||||
dst_release(&rt->u.dst);
|
||||
rt = NULL;
|
||||
}
|
||||
xfrm_lookup((struct dst_entry **)&rt, &fl, NULL, 0);
|
||||
|
||||
return rt;
|
||||
}
|
||||
|
Reference in New Issue
Block a user