1
0
Fork 0
mirror of https://github.com/yshui/picom.git synced 2025-04-07 17:44:04 -04:00

config: fix use-after-free

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 <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2024-06-27 13:58:46 +01:00
parent 69dd18d771
commit 56fea383f0
No known key found for this signature in database
GPG key ID: D3A4405BE6CC17F4

View file

@ -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) {