From e18dbd059319ac8d3fc0a0a23f6a8abcb9a59a31 Mon Sep 17 00:00:00 2001 From: "Eric W. Biederman" Date: Sun, 1 Mar 2015 23:59:57 -0600 Subject: 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 --- net/ax25/ax25_ip.c | 1 + 1 file changed, 1 insertion(+) (limited to 'net/ax25') diff --git a/net/ax25/ax25_ip.c b/net/ax25/ax25_ip.c index 67de6b33f2c3..db3c283821d1 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; } -- cgit v1.2.3