aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ppp_async.c6
-rw-r--r--drivers/net/ppp_generic.c6
-rw-r--r--drivers/net/ppp_synctty.c3
3 files changed, 5 insertions, 10 deletions
diff --git a/drivers/net/ppp_async.c b/drivers/net/ppp_async.c
index 6567fabd2e13..5de6fedd1d76 100644
--- a/drivers/net/ppp_async.c
+++ b/drivers/net/ppp_async.c
@@ -233,11 +233,9 @@ ppp_asynctty_close(struct tty_struct *tty)
233 tasklet_kill(&ap->tsk); 233 tasklet_kill(&ap->tsk);
234 234
235 ppp_unregister_channel(&ap->chan); 235 ppp_unregister_channel(&ap->chan);
236 if (ap->rpkt) 236 kfree_skb(ap->rpkt);
237 kfree_skb(ap->rpkt);
238 skb_queue_purge(&ap->rqueue); 237 skb_queue_purge(&ap->rqueue);
239 if (ap->tpkt) 238 kfree_skb(ap->tpkt);
240 kfree_skb(ap->tpkt);
241 kfree(ap); 239 kfree(ap);
242} 240}
243 241
diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c
index ea8cdf8e4be8..42d455578453 100644
--- a/drivers/net/ppp_generic.c
+++ b/drivers/net/ppp_generic.c
@@ -1245,8 +1245,7 @@ ppp_send_frame(struct ppp *ppp, struct sk_buff *skb)
1245 return; 1245 return;
1246 1246
1247 drop: 1247 drop:
1248 if (skb) 1248 kfree_skb(skb);
1249 kfree_skb(skb);
1250 ++ppp->dev->stats.tx_errors; 1249 ++ppp->dev->stats.tx_errors;
1251} 1250}
1252 1251
@@ -2658,8 +2657,7 @@ static void ppp_destroy_interface(struct ppp *ppp)
2658 ppp->active_filter = NULL; 2657 ppp->active_filter = NULL;
2659#endif /* CONFIG_PPP_FILTER */ 2658#endif /* CONFIG_PPP_FILTER */
2660 2659
2661 if (ppp->xmit_pending) 2660 kfree_skb(ppp->xmit_pending);
2662 kfree_skb(ppp->xmit_pending);
2663 2661
2664 free_netdev(ppp->dev); 2662 free_netdev(ppp->dev);
2665} 2663}
diff --git a/drivers/net/ppp_synctty.c b/drivers/net/ppp_synctty.c
index 1e892b7b1f8c..3ea791d16b00 100644
--- a/drivers/net/ppp_synctty.c
+++ b/drivers/net/ppp_synctty.c
@@ -281,8 +281,7 @@ ppp_sync_close(struct tty_struct *tty)
281 281
282 ppp_unregister_channel(&ap->chan); 282 ppp_unregister_channel(&ap->chan);
283 skb_queue_purge(&ap->rqueue); 283 skb_queue_purge(&ap->rqueue);
284 if (ap->tpkt) 284 kfree_skb(ap->tpkt);
285 kfree_skb(ap->tpkt);
286 kfree(ap); 285 kfree(ap);
287} 286}
288 287