I had a go at #4519 (moved), and instead of doing the thing described there I decided to simplify the code and make the big global_circuitlist list a nice doubly-linked list.
Trac: Username: marek
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items 0
Show closed items
No child items are currently assigned. Use child items to break down this issue into smaller parts.
Linked items 0
Link issues together to show that they're related.
Learn more.
I think this is a good idea. I'm was confused by moving the remove code into circuit_free, but I think it does make sense there. We should audit every caller to circuit_free, of course. I was also worried about not using FOREACH_SAFE for the loop that has a local variable called "victim", but apparently that "victim" is only at risk of being marked, not freed. I should double-check this all more carefully rsn.
I think this is a good idea. I'm was confused by moving the remove code into circuit_free, but I think it does make sense there. We should audit every caller to circuit_free, of course.
There are two of those. 429:circuit_close_all_marked and 810:circuit_free_all and wrapped in FOREACH_SAFE. I'm fairly sure there isn't a memory leak there.