patch-2.4.6 linux/net/lapb/lapb_subr.c

Next file: linux/net/netlink/af_netlink.c
Previous file: linux/net/khttpd/security.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.5/linux/net/lapb/lapb_subr.c linux/net/lapb/lapb_subr.c
@@ -38,13 +38,8 @@
  */
 void lapb_clear_queues(lapb_cb *lapb)
 {
-	struct sk_buff *skb;
-
-	while ((skb = skb_dequeue(&lapb->write_queue)) != NULL)
-		kfree_skb(skb);
-
-	while ((skb = skb_dequeue(&lapb->ack_queue)) != NULL)
-		kfree_skb(skb);
+	skb_queue_purge(&lapb->write_queue);
+	skb_queue_purge(&lapb->ack_queue);
 }
 
 /*

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)