提交 e18dbd05 编写于 作者: E Eric W. Biederman 提交者: David S. Miller

ax25: In ax25_rebuild_header add missing kfree_skb

In the unlikely (impossible?) event that we attempt to transmit
an ax25 packet over a non-ax25 device free the skb so we don't
leak it.

Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-hams@vger.kernel.org
Signed-off-by: N"Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 61e021f3
...@@ -129,6 +129,7 @@ int ax25_rebuild_header(struct sk_buff *skb) ...@@ -129,6 +129,7 @@ int ax25_rebuild_header(struct sk_buff *skb)
dev = skb->dev; dev = skb->dev;
if ((ax25_dev = ax25_dev_ax25dev(dev)) == NULL) { if ((ax25_dev = ax25_dev_ax25dev(dev)) == NULL) {
kfree_skb(skb);
goto put; goto put;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册