diff --git a/net/core/lwt_bpf.c b/net/core/lwt_bpf.c index efbd9eecb00d..c5b90a309685 100644 --- a/net/core/lwt_bpf.c +++ b/net/core/lwt_bpf.c @@ -246,8 +246,10 @@ static int bpf_lwt_xmit_reroute(struct sk_buff *skb) * if there is enough header space in skb. */ err = skb_cow_head(skb, LL_RESERVED_SPACE(dst->dev)); - if (unlikely(err)) + if (unlikely(err)) { + dst_release(dst); goto err; + } skb_dst_drop(skb); skb_dst_set(skb, dst);