diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2010-06-28 02:37:48 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2010-06-28 02:37:48 +0200 |
commit | 99dd898a59d5316dccbb00294305e7eeba3ad8d8 (patch) | |
tree | 6867026ce3839bac5188d1116399911ba4b943b4 | |
parent | 1bb5a381a2e2f345beb1ca8d019b6174b13bb125 (diff) |
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).
-rw-r--r-- | pfinet/glue-include/linux/sched.h | 3 |
1 files changed, 2 insertions, 1 deletions
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; |