mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	card-restore: Handle reading NULL profile name from the database.
It's assumed in a couple of places that entry_read() initializes entry->profile to a non-NULL string. This patch makes those assumptions hold. Tested-by: Mikel Astiz <mikel.astiz.oss@gmail.com>
This commit is contained in:
		
							parent
							
								
									758e5bc28e
								
							
						
					
					
						commit
						cec6b153b7
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -223,6 +223,9 @@ static struct entry* entry_read(struct userdata *u, const char *name) {
 | 
			
		|||
        goto fail;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (!profile)
 | 
			
		||||
        profile = "";
 | 
			
		||||
 | 
			
		||||
    e->profile = pa_xstrdup(profile);
 | 
			
		||||
 | 
			
		||||
    if (e->version >= 2) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue