mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	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:
		
							parent
							
								
									25a0e3beb4
								
							
						
					
					
						commit
						184e80d753
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
					@ -99,9 +99,9 @@ support_log_parse_patterns(struct spa_list *patterns, const char *jsonstr)
 | 
				
			||||||
void
 | 
					void
 | 
				
			||||||
support_log_free_patterns(struct spa_list *patterns)
 | 
					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);
 | 
							spa_list_remove(&p->link);
 | 
				
			||||||
		free(p);
 | 
							free(p);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue