patch-2.4.6 linux/net/rose/rose_subr.c

Next file: linux/net/sched/sch_cbq.c
Previous file: linux/net/rose/rose_route.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.5/linux/net/rose/rose_subr.c linux/net/rose/rose_subr.c
@@ -42,13 +42,8 @@
  */
 void rose_clear_queues(struct sock *sk)
 {
-	struct sk_buff *skb;
-
-	while ((skb = skb_dequeue(&sk->write_queue)) != NULL)
-		kfree_skb(skb);
-
-	while ((skb = skb_dequeue(&sk->protinfo.rose->ack_queue)) != NULL)
-		kfree_skb(skb);
+	skb_queue_purge(&sk->write_queue);
+	skb_queue_purge(&sk->protinfo.rose->ack_queue);
 }
 
 /*

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