mirror of
				https://github.com/alsa-project/alsa-lib.git
				synced 2025-11-03 09:01:52 -05:00 
			
		
		
		
	ucm: uc_mgr_substitute_tree() fix use after free
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
		
							parent
							
								
									51e1d486ce
								
							
						
					
					
						commit
						3f63dc2644
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -417,11 +417,12 @@ int uc_mgr_substitute_tree(snd_use_case_mgr_t *uc_mgr, snd_config_t *node)
 | 
			
		|||
		if (err < 0)
 | 
			
		||||
			return err;
 | 
			
		||||
		err = snd_config_set_id(node, s);
 | 
			
		||||
		free(s);
 | 
			
		||||
		if (err < 0) {
 | 
			
		||||
			uc_error("unable to set substituted id '%s' (old id '%s')", s, id);
 | 
			
		||||
			free(s);
 | 
			
		||||
			return err;
 | 
			
		||||
		}
 | 
			
		||||
		free(s);
 | 
			
		||||
	}
 | 
			
		||||
	if (snd_config_get_type(node) != SND_CONFIG_TYPE_COMPOUND) {
 | 
			
		||||
		if (snd_config_get_type(node) == SND_CONFIG_TYPE_STRING) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue