mirror of
				https://github.com/alsa-project/alsa-lib.git
				synced 2025-11-03 09:01:52 -05:00 
			
		
		
		
	- check the return value of malloc & co.
This commit is contained in:
		
							parent
							
								
									7e6569e300
								
							
						
					
					
						commit
						d91948db49
					
				
					 7 changed files with 42 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -923,6 +923,8 @@ int snd_pcm_direct_parse_bindings(snd_pcm_direct_t *dmix, snd_config_t *cfg)
 | 
			
		|||
		return -EINVAL;
 | 
			
		||||
	}
 | 
			
		||||
	dmix->bindings = malloc(count * sizeof(unsigned int));
 | 
			
		||||
	if (dmix->bindings == NULL)
 | 
			
		||||
		return -ENOMEM;
 | 
			
		||||
	for (chn = 0; chn < count; chn++)
 | 
			
		||||
		dmix->bindings[chn] = UINT_MAX;		/* don't route */
 | 
			
		||||
	snd_config_for_each(i, next, cfg) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue