Skip to content
Commit 1b479fb8 authored by Lv Yunlong's avatar Lv Yunlong Committed by David S. Miller
Browse files

drivers/net/wan/hdlc_fr: Fix a double free in pvc_xmit

In pvc_xmit, if __skb_pad(skb, pad, false) failed, it will free
the skb in the first time and goto drop. But the same skb is freed
by kfree_skb(skb) in the second time in drop.

Maintaining the original function unchanged, my patch adds a new
label out to avoid the double free if __skb_pad() failed.

Fixes: f5083d0c

 ("drivers/net/wan/hdlc_fr: Improvements to the code of pvc_xmit")
Signed-off-by: default avatarLv Yunlong <lyl2019@mail.ustc.edu.cn>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 75887e88
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment