about summary refs log tree commit diff
path: root/src/rt/rust_kernel.cpp
diff options
context:
space:
mode:
authorEric Holk <eholk@mozilla.com>2011-08-13 18:15:56 -0700
committerEric Holk <eholk@mozilla.com>2011-08-15 09:26:52 -0700
commitd63f8340a5e947cdf6b3ad34d3683f2ae9e5cf84 (patch)
treed125d87449992eeed18954fca6052c7f7e1fb543 /src/rt/rust_kernel.cpp
parentaa0a51a7f56c4c343b296492ffaa2bc296c0b224 (diff)
downloadrust-d63f8340a5e947cdf6b3ad34d3683f2ae9e5cf84.tar.gz
rust-d63f8340a5e947cdf6b3ad34d3683f2ae9e5cf84.zip
Properly ref counting to fix valgrind issues on linux.
Diffstat (limited to 'src/rt/rust_kernel.cpp')
-rw-r--r--src/rt/rust_kernel.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/rt/rust_kernel.cpp b/src/rt/rust_kernel.cpp
index 89c06885683..c11a5b69b73 100644
--- a/src/rt/rust_kernel.cpp
+++ b/src/rt/rust_kernel.cpp
@@ -160,6 +160,7 @@ rust_kernel::get_task_by_id(rust_task_id id) {
     rust_task *task = NULL;
     // get leaves task unchanged if not found.
     task_table.get(id, &task);
+    if(task) task->ref();
     return task;
 }