mirror of
				https://github.com/alsa-project/alsa-lib.git
				synced 2025-10-29 05:40:25 -04:00 
			
		
		
		
	mixer: bag - fix bag_del_all implementation (missing free)
The bag1_t structure must be freed, too. Fixes: https://github.com/alsa-project/alsa-lib/issues/453 Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
		
							parent
							
								
									368ea9af82
								
							
						
					
					
						commit
						8df60992b7
					
				
					 1 changed files with 7 additions and 2 deletions
				
			
		|  | @ -68,6 +68,11 @@ int bag_del(bag_t *bag, void *ptr) | |||
| 
 | ||||
| void bag_del_all(bag_t *bag) | ||||
| { | ||||
| 	while (!list_empty(bag)) | ||||
| 		list_del(bag->next); | ||||
| 	struct list_head *pos, *npos; | ||||
| 
 | ||||
| 	list_for_each_safe(pos, npos, bag) { | ||||
| 		bag1_t *b = list_entry(pos, bag1_t, list); | ||||
| 		list_del(&b->list); | ||||
| 		free(b); | ||||
| 	} | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Jaroslav Kysela
						Jaroslav Kysela