Skip to content

Commit

Permalink
ax25: In ax25_rebuild_header add missing kfree_skb
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: [email protected]
Signed-off-by: "Eric W. Biederman" <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
ebiederm authored and davem330 committed Mar 2, 2015
1 parent 61e021f commit e18dbd0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/ax25/ax25_ip.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit e18dbd0

Please sign in to comment.