pw-link: free target_link objects at the end

This commit is contained in:
Barnabás Pőcze 2024-02-14 18:24:58 +01:00 committed by Wim Taymans
parent 09e0113b6a
commit d84101d97f

View file

@ -995,9 +995,11 @@ int main(int argc, char *argv[])
} }
struct target_link *tl; struct target_link *tl;
spa_list_for_each(tl, &data.target_links, link) { spa_list_consume(tl, &data.target_links, link) {
spa_hook_remove(&tl->listener); spa_hook_remove(&tl->listener);
pw_proxy_destroy(tl->proxy); pw_proxy_destroy(tl->proxy);
spa_list_remove(&tl->link);
free(tl);
} }
if (data.out_regex) if (data.out_regex)