diff options
author | David Barksdale <amatus@amatus.name> | 2015-01-04 11:24:28 -0600 |
---|---|---|
committer | David Barksdale <amatus@amatus.name> | 2015-01-04 11:24:28 -0600 |
commit | e513852853e0241e56b4ee27a285dae5e07f1055 (patch) | |
tree | 2ed39db0795c996e272b3b32677fe7d845b8babb | |
parent | ecd8b2364f008f506a95b5b0c543053aa12797c4 (diff) |
Fix leak in SCHEDULER_TASKS
-rw-r--r-- | gnunet-build/packages/gnunet/gnunet/files/scheduler.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gnunet-build/packages/gnunet/gnunet/files/scheduler.js b/gnunet-build/packages/gnunet/gnunet/files/scheduler.js index 256b77d..3ec8031 100644 --- a/gnunet-build/packages/gnunet/gnunet/files/scheduler.js +++ b/gnunet-build/packages/gnunet/gnunet/files/scheduler.js @@ -27,7 +27,9 @@ mergeInto(LibraryManager.library, { // This is the shutdown task, ignore for now return 0; } - var id = setTimeout(function() { + var id; + id = setTimeout(function() { + delete SCHEDULER_TASKS[id]; var stack = Runtime.stackSave(); var tc = Runtime.stackAlloc(3 * 4); // struct GNUNET_SCHEDULER_TaskContext setValue(tc, 2, 'i32'); // ts.reason = GNUNET_SCHEDULER_REASON_TIMEOUT |