mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	fix an error where a signal was accidently freed when it is tried to register it twice
This commit is contained in:
		
							parent
							
								
									2a32de1eaa
								
							
						
					
					
						commit
						ef5af553d6
					
				
					 1 changed files with 2 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -170,7 +170,7 @@ pa_signal_event* pa_signal_new(int sig, pa_signal_cb_t _callback, void *userdata
 | 
			
		|||
 | 
			
		||||
    for (e = signals; e; e = e->next)
 | 
			
		||||
        if (e->sig == sig)
 | 
			
		||||
            goto fail;
 | 
			
		||||
            return NULL;
 | 
			
		||||
 | 
			
		||||
    e = pa_xnew(pa_signal_event, 1);
 | 
			
		||||
    e->sig = sig;
 | 
			
		||||
| 
						 | 
				
			
			@ -196,8 +196,7 @@ pa_signal_event* pa_signal_new(int sig, pa_signal_cb_t _callback, void *userdata
 | 
			
		|||
 | 
			
		||||
    return e;
 | 
			
		||||
fail:
 | 
			
		||||
    if (e)
 | 
			
		||||
        pa_xfree(e);
 | 
			
		||||
    pa_xfree(e);
 | 
			
		||||
    return NULL;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue