diff options
| author | bors <bors@rust-lang.org> | 2013-05-07 17:30:38 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-05-07 17:30:38 -0700 |
| commit | d35eb6e1ee58f795bc77cb59aa1829f725db90e0 (patch) | |
| tree | 11642982ddd2eb646d2a17a3b2f8b221dc42a318 /src/rt/rust_task.cpp | |
| parent | 847552f48b51aec0fcc6b7fd2ee2a51f3700321a (diff) | |
| parent | 11f7cb26c27c3eb3af3f7ef4f9cdb85327e6e030 (diff) | |
| download | rust-d35eb6e1ee58f795bc77cb59aa1829f725db90e0.tar.gz rust-d35eb6e1ee58f795bc77cb59aa1829f725db90e0.zip | |
auto merge of #6302 : nikomatsakis/rust/issue-6141-leaking-owned-fn, r=brson
When autoborrowing a fn in trans, adjust the type of the datum to be `&fn`. Fixes #6141. r? @brson
Diffstat (limited to 'src/rt/rust_task.cpp')
| -rw-r--r-- | src/rt/rust_task.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/rt/rust_task.cpp b/src/rt/rust_task.cpp index 23e70535768..266c0652c6e 100644 --- a/src/rt/rust_task.cpp +++ b/src/rt/rust_task.cpp @@ -76,15 +76,8 @@ rust_task::delete_this() assert(ref_count == 0); // || // (ref_count == 1 && this == sched->root_task)); - if (borrow_list) { - // NOTE should free borrow_list from within rust code! - // If there is a pointer in there, it is a ~[BorrowRecord] pointer, - // which are currently allocated with LIBC malloc/free. But this is - // not really the right way to do this, we should be freeing this - // pointer from Rust code. - free(borrow_list); - borrow_list = NULL; - } + // The borrow list should be freed in the task annihilator + assert(!borrow_list); sched_loop->release_task(this); } |
