Skip to content

Commit

Permalink
config: fix use-after-free
Browse files Browse the repository at this point in the history
When legacy backends are enabled, `options->all_scripts` is freed by
option sanitization, but is later used again by
`generate_fading_config`.

Signed-off-by: Yuxuan Shui <[email protected]>
  • Loading branch information
yshui committed Jun 27, 2024
1 parent 5b5174b commit f086091
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,7 @@ static bool sanitize_options(struct options *opt) {
for (size_t i = 0; i < ARR_SIZE(opt->animations); i++) {
opt->animations[i].script = NULL;
}
dynarr_free(opt->all_scripts, script_ptr_deinit);
dynarr_clear(opt->all_scripts, script_ptr_deinit);
}

if (opt->window_shader_fg || opt->window_shader_fg_rules) {
Expand Down

0 comments on commit f086091

Please sign in to comment.