mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	alsa: Fix crash when profile_set == NULL
Better check if the pointer is NULL before dereferencing it, instead of after! BugLink: https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1159853 Signed-off-by: David Henningsson <david.henningsson@canonical.com>
This commit is contained in:
		
							parent
							
								
									a9915752f8
								
							
						
					
					
						commit
						0a9a1d7488
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
					@ -689,11 +689,11 @@ int pa__init(pa_module *m) {
 | 
				
			||||||
        pa_xfree(fn);
 | 
					        pa_xfree(fn);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    u->profile_set->ignore_dB = ignore_dB;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    if (!u->profile_set)
 | 
					    if (!u->profile_set)
 | 
				
			||||||
        goto fail;
 | 
					        goto fail;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    u->profile_set->ignore_dB = ignore_dB;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    pa_alsa_profile_set_probe(u->profile_set, u->device_id, &m->core->default_sample_spec, m->core->default_n_fragments, m->core->default_fragment_size_msec);
 | 
					    pa_alsa_profile_set_probe(u->profile_set, u->device_id, &m->core->default_sample_spec, m->core->default_n_fragments, m->core->default_fragment_size_msec);
 | 
				
			||||||
    pa_alsa_profile_set_dump(u->profile_set);
 | 
					    pa_alsa_profile_set_dump(u->profile_set);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue