mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	fix destruction when no profiles are defined
This commit is contained in:
		
							parent
							
								
									936862362c
								
							
						
					
					
						commit
						7aa7a7b6ac
					
				
					 1 changed files with 5 additions and 3 deletions
				
			
		| 
						 | 
					@ -165,10 +165,12 @@ void pa_card_free(pa_card *c) {
 | 
				
			||||||
    pa_assert(pa_idxset_isempty(c->sources));
 | 
					    pa_assert(pa_idxset_isempty(c->sources));
 | 
				
			||||||
    pa_idxset_free(c->sources, NULL, NULL);
 | 
					    pa_idxset_free(c->sources, NULL, NULL);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (c->profiles) {
 | 
				
			||||||
        while ((profile = pa_hashmap_steal_first(c->profiles)))
 | 
					        while ((profile = pa_hashmap_steal_first(c->profiles)))
 | 
				
			||||||
            pa_card_profile_free(profile);
 | 
					            pa_card_profile_free(profile);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        pa_hashmap_free(c->profiles, NULL, NULL);
 | 
					        pa_hashmap_free(c->profiles, NULL, NULL);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    pa_proplist_free(c->proplist);
 | 
					    pa_proplist_free(c->proplist);
 | 
				
			||||||
    pa_xfree(c->driver);
 | 
					    pa_xfree(c->driver);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue