From 99dd898a59d5316dccbb00294305e7eeba3ad8d8 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Mon, 28 Jun 2010 02:37:48 +0200 Subject: Fix memory leak on schedule_timeout * pfinet/glue-include/linux/sched.h (schedule_timeout): Make the automatically-allocated wait_queue pointer static instead of dynamic (and lost). --- pfinet/glue-include/linux/sched.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pfinet') diff --git a/pfinet/glue-include/linux/sched.h b/pfinet/glue-include/linux/sched.h index f57de2c3..d4cae42a 100644 --- a/pfinet/glue-include/linux/sched.h +++ b/pfinet/glue-include/linux/sched.h @@ -162,7 +162,8 @@ schedule_timeout (long timeout) { long expire = timeout + jiffies; struct timer_list timer; - struct wait_queue *sleep = 0; /* See comment in wait.h why this suffices. */ + static struct wait_queue *sleep = 0; /* See comment in wait.h why this suffices. */ + /* TODO: but free it !! */ init_timer (&timer); timer.expires = expire; -- cgit v1.2.3