Skip to content

Commit

Permalink
pptp: fix skb leak in pptp_xmit()
Browse files Browse the repository at this point in the history
In case we cant transmit skb, we must free it

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Dmitry Kozlov <xeb@mail.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Oct 19, 2011
1 parent 4d97480 commit 8bae8bd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/pptp.c
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,10 @@ static int pptp_xmit(struct ppp_channel *chan, struct sk_buff *skb)
ip_send_check(iph);

ip_local_out(skb);
return 1;

tx_error:
kfree_skb(skb);
return 1;
}

Expand Down

0 comments on commit 8bae8bd

Please sign in to comment.