summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2022-06-13 19:06:34 -0700
committerVito Caputo <vcaputo@pengaru.com>2022-06-13 19:06:34 -0700
commitf1e59ffe5607ae8b84f03f153cacb27bc3024bac (patch)
tree9d8591929985e11c65b177491acb1ecb325f9ad6 /src
parent37431e5da9fb37ecfed0163abe5f7d8072a5ed0b (diff)
modules/sparkler: plug longstanding chunker leak
Once upon a time this thing asserted the pinned chunks were empty, and that code is still sitting there commented out. But when it was commented out ages ago, to enable bulk freeing of chunkers without requiring unrefs of every allocation as an optimization, no code was added to free the pinned chunks. It's been easily ignored all this time since nobody really runs rototiller long enough to notice, but that's becoming less true now with how interesting something like: --module=rtv,layers=compose,duration=1,context_duration=1,snow_module=none is becoming... There are other leaks still, largely surrounding settings, but they are quite small. Eventually those will get tidied up as well.
Diffstat (limited to 'src')
-rw-r--r--src/modules/sparkler/chunker.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/modules/sparkler/chunker.c b/src/modules/sparkler/chunker.c
index 96dd911..8d97c49 100644
--- a/src/modules/sparkler/chunker.c
+++ b/src/modules/sparkler/chunker.c
@@ -199,6 +199,9 @@ void chunker_free_chunker(chunker_t *chunker)
parameter.
assert(list_empty(&chunker->pinned_chunks));
*/
+ list_for_each_entry_safe(chunk, _chunk, &chunker->pinned_chunks, chunks) {
+ free(chunk);
+ }
list_for_each_entry_safe(chunk, _chunk, &chunker->free_chunks, chunks) {
free(chunk);
© All Rights Reserved