mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	Fix crash on jack server shutdown
On sink unlinking, existing sink inputs are moved, which in turn calls a get latency callback, which references the jack client. Therefore, make sure the sink is unlinked before the client is closed. Failure to do so might lead to SIGSEGV.
This commit is contained in:
		
							parent
							
								
									29845be64d
								
							
						
					
					
						commit
						e756467434
					
				
					 1 changed files with 3 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -475,12 +475,12 @@ void pa__done(pa_module*m) {
 | 
			
		|||
    if (!(u = m->userdata))
 | 
			
		||||
        return;
 | 
			
		||||
 | 
			
		||||
    if (u->client)
 | 
			
		||||
        jack_client_close(u->client);
 | 
			
		||||
 | 
			
		||||
    if (u->sink)
 | 
			
		||||
        pa_sink_unlink(u->sink);
 | 
			
		||||
 | 
			
		||||
    if (u->client)
 | 
			
		||||
        jack_client_close(u->client);
 | 
			
		||||
 | 
			
		||||
    if (u->thread) {
 | 
			
		||||
        pa_asyncmsgq_send(u->thread_mq.inq, NULL, PA_MESSAGE_SHUTDOWN, NULL, 0, NULL);
 | 
			
		||||
        pa_thread_free(u->thread);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue