spa: support: use spa_list_consume()

Use `spa_list_consume()` when freeing entities in the pattern
list instead of `spa_list_for_each_safe()`.
This commit is contained in:
Barnabás Pőcze 2021-09-29 16:17:18 +02:00 committed by Wim Taymans
parent 25a0e3beb4
commit 184e80d753

View file

@ -99,9 +99,9 @@ support_log_parse_patterns(struct spa_list *patterns, const char *jsonstr)
void
support_log_free_patterns(struct spa_list *patterns)
{
struct support_log_pattern *p, *tmp;
struct support_log_pattern *p;
spa_list_for_each_safe(p, tmp, patterns, link) {
spa_list_consume(p, patterns, link) {
spa_list_remove(&p->link);
free(p);
}