mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	module: Fix crash in pa_module_unload_all()
Previously, if there were no modules loaded when the daemon exited, pa_module_unload_all() would crash due to giving zero count to pa_xnew(). Thanks to Pierre Ossman for the patch.
This commit is contained in:
		
							parent
							
								
									1ce71cbd82
								
							
						
					
					
						commit
						ada83601f0
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -221,6 +221,9 @@ void pa_module_unload_all(pa_core *c) {
 | 
			
		|||
    pa_assert(c);
 | 
			
		||||
    pa_assert(c->modules);
 | 
			
		||||
 | 
			
		||||
    if (pa_idxset_isempty(c->modules))
 | 
			
		||||
        return;
 | 
			
		||||
 | 
			
		||||
    /* Unload modules in reverse order by default */
 | 
			
		||||
    indices = pa_xnew(uint32_t, pa_idxset_size(c->modules));
 | 
			
		||||
    i = 0;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue