[PKT_SCHED]: netem: memory leak

Linux Kernel Mailing List <[email protected]>
Newsgroups gmane.linux.kernel.commits.2-4
Message-ID <[email protected]>
ChangeSet 1.1539.1.6, 2005/02/06 21:47:40-08:00, [email protected]

	[PKT_SCHED]: netem: memory leak
	
	Good catch.. netem needs to free skb's that are dropped due to loss
	simulation.
	
	Signed-off-by: David S. Miller <[email protected]>



 sch_netem.c |    1 +
 1 files changed, 1 insertion(+)


diff -Nru a/net/sched/sch_netem.c b/net/sched/sch_netem.c
--- a/net/sched/sch_netem.c	2005-02-09 09:07:36 -08:00
+++ b/net/sched/sch_netem.c	2005-02-09 09:07:36 -08:00
@@ -180,6 +180,7 @@
 	if (q->loss && q->loss >= get_crandom(&q->loss_cor)) {
 		pr_debug("netem_enqueue: random loss\n");
 		sch->stats.drops++;
+		kfree_skb(skb);
 		return 0;	/* lie about loss so TCP doesn't know */
 	}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.