mirror of
				https://github.com/alsa-project/alsa-lib.git
				synced 2025-11-03 09:01:52 -05:00 
			
		
		
		
	fix two issues in snd_device_name_hint()
- returned wrong error when the namehint section does not exist - variable underflow for the rawmidi interface
This commit is contained in:
		
							parent
							
								
									13fdc41785
								
							
						
					
					
						commit
						faf8aad99a
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -425,7 +425,7 @@ static int add_card(struct hint_list *list, int card, snd_ctl_elem_iface_t iface
 | 
			
		|||
int snd_device_name_hint(int card, snd_ctl_elem_iface_t iface, char ***hints)
 | 
			
		||||
{
 | 
			
		||||
	struct hint_list list;
 | 
			
		||||
	char ehints[16];
 | 
			
		||||
	char ehints[24];
 | 
			
		||||
	const char *str;
 | 
			
		||||
	snd_config_t *conf;
 | 
			
		||||
	snd_config_iterator_t i, next;
 | 
			
		||||
| 
						 | 
				
			
			@ -466,6 +466,7 @@ int snd_device_name_hint(int card, snd_ctl_elem_iface_t iface, char ***hints)
 | 
			
		|||
				goto __error;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	err = 0;
 | 
			
		||||
      __error:
 | 
			
		||||
      	if (err < 0) {
 | 
			
		||||
      		snd_device_name_free_hint(list.list);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue