From: Eric W. Biederman Date: Mon, 2 Mar 2015 05:59:57 +0000 (-0600) Subject: ax25: In ax25_rebuild_header add missing kfree_skb X-Git-Tag: v4.1-rc1~128^2~371^2~14 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e18dbd059319ac8d3fc0a0a23f6a8abcb9a59a31;p=platform%2Fkernel%2Flinux-exynos.git 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 Cc: linux-hams@vger.kernel.org Signed-off-by: "Eric W. Biederman" Signed-off-by: David S. Miller --- diff --git a/net/ax25/ax25_ip.c b/net/ax25/ax25_ip.c index 67de6b3..db3c283 100644 --- a/net/ax25/ax25_ip.c +++ b/net/ax25/ax25_ip.c @@ -129,6 +129,7 @@ int ax25_rebuild_header(struct sk_buff *skb) dev = skb->dev; if ((ax25_dev = ax25_dev_ax25dev(dev)) == NULL) { + kfree_skb(skb); goto put; }