pptp: fix skb leak in pptp_xmit()
authorEric Dumazet <eric.dumazet@gmail.com>
Mon, 17 Oct 2011 17:01:47 +0000 (17:01 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 19 Oct 2011 06:39:43 +0000 (02:39 -0400)
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>
drivers/net/pptp.c

index eae542a7e987e6e4dd4a54f3d7cb127f3766fc47..9c0403d0107cd42cfd12f8902b90df6dcc3b694c 100644 (file)
@@ -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;
 }