mirror of
				https://github.com/alsa-project/alsa-lib.git
				synced 2025-11-03 09:01:52 -05:00 
			
		
		
		
	ucm: Set uc_mgr->ctl to NULL after closing it.
Fixes a double-free bug. Signed-off-by: Tanu Kaskinen <tanuk@iki.fi> Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
		
							parent
							
								
									b11911dddf
								
							
						
					
					
						commit
						1629e2fbf3
					
				
					 1 changed files with 1 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -145,6 +145,7 @@ static int open_ctl(snd_use_case_mgr_t *uc_mgr,
 | 
			
		|||
		free(uc_mgr->ctl_dev);
 | 
			
		||||
		uc_mgr->ctl_dev = NULL;
 | 
			
		||||
		snd_ctl_close(uc_mgr->ctl);
 | 
			
		||||
		uc_mgr->ctl = NULL;
 | 
			
		||||
	
 | 
			
		||||
	}
 | 
			
		||||
	err = snd_ctl_open(ctl, ctl_dev, 0);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue