mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	Fix checking for NULL after usage
The pa_xmalloc calls oom() in case of NULL pointer returned by malloc() on one hand and dereferencing of pointer is happen early than actual check on other hand. Thus, just remove useless checks.
This commit is contained in:
		
							parent
							
								
									ae383539d7
								
							
						
					
					
						commit
						300384ce0a
					
				
					 4 changed files with 9 additions and 18 deletions
				
			
		| 
						 | 
				
			
			@ -299,8 +299,7 @@ pa_resampler* pa_resampler_new(
 | 
			
		|||
    return r;
 | 
			
		||||
 | 
			
		||||
fail:
 | 
			
		||||
    if (r)
 | 
			
		||||
        pa_xfree(r);
 | 
			
		||||
    pa_xfree(r);
 | 
			
		||||
 | 
			
		||||
    return NULL;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue