diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2023-06-03 18:57:59 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2023-06-03 18:57:59 -0700 |
commit | 7457623865790f688a72dc20b420edadc56c5298 (patch) | |
tree | 60c9d4dfb600a9a13c6a96bf890b308ccd000c1c /src/modules | |
parent | 09c67051ff526fd25e6929c90fcaa0ce8cfb6079 (diff) |
modules/rtv: plug non-snow-channel til_setup_t leak
Somewhere along the line this leak was created, there's been a
lot of activity surrounding this stuff so it's unsurprising.
A little janky surrounding the conditional on snow module, but
that's just how snow is handled today - it doesn't get randomized
like the other channels do.
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/rtv/rtv.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/modules/rtv/rtv.c b/src/modules/rtv/rtv.c index a73c9a5..9f7470b 100644 --- a/src/modules/rtv/rtv.c +++ b/src/modules/rtv/rtv.c @@ -123,6 +123,14 @@ static void cleanup_channel(rtv_context_t *ctxt) ctxt->channel->cumulative_time = 0; + /* we have to cleanup the non-snow module "baked" setups, it could happen + * immediately after the context create instead since the context holds a reference. + * just doing it here since it's an explicit cleanup block... snow doesn't get + * this treatment because we don't randomize its setup TODO revisit snow setup handling + */ + if (ctxt->channel != &ctxt->snow_channel) + ctxt->channel->module_setup = til_setup_free(ctxt->channel->module_setup); + ctxt->channel->module_ctxt = til_module_context_free(ctxt->channel->module_ctxt); free(ctxt->channel->settings_as_arg); |