mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-22 10:57:08 +00:00
f_output_chain: prevent double free of child filters
When mp_output_chain_update_filters() fails, talloc_free() is called on each mp_user_filter. But because the structure doesn't have a talloc destructor, the args aren't freed, resulting in stale references. Fix this by calling the destructor of the wrapped filter instead.
This commit is contained in:
@@ -627,7 +627,7 @@ bool mp_output_chain_update_filters(struct mp_output_chain *c,
|
||||
|
||||
error:
|
||||
for (int n = 0; n < num_add; n++)
|
||||
talloc_free(add[n]);
|
||||
talloc_free(add[n]->wrapper);
|
||||
talloc_free(add);
|
||||
talloc_free(used);
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user