summaryrefslogtreecommitdiff
path: root/pfinet/glue-include
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2010-06-28 02:37:48 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2010-06-28 02:37:48 +0200
commit99dd898a59d5316dccbb00294305e7eeba3ad8d8 (patch)
tree6867026ce3839bac5188d1116399911ba4b943b4 /pfinet/glue-include
parent1bb5a381a2e2f345beb1ca8d019b6174b13bb125 (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).
Diffstat (limited to 'pfinet/glue-include')
-rw-r--r--pfinet/glue-include/linux/sched.h3
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;