mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	pulse-server: module-null-sink: provide fallback name
If no `sink_name` has been specified, use "null-sink" to avoid a NULL pointer dereference later in the function.
This commit is contained in:
		
							parent
							
								
									09c162c8bf
								
							
						
					
					
						commit
						12359b490d
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -146,6 +146,10 @@ struct module *create_module_null_sink(struct impl *impl, const char *argument)
 | 
			
		|||
		pw_properties_set(props, PW_KEY_NODE_NAME, str);
 | 
			
		||||
		pw_properties_set(props, "sink_name", NULL);
 | 
			
		||||
	}
 | 
			
		||||
	else {
 | 
			
		||||
		pw_properties_set(props, PW_KEY_NODE_NAME, "null-sink");
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if ((str = pw_properties_get(props, "sink_properties")) != NULL) {
 | 
			
		||||
		module_args_add_props(props, str);
 | 
			
		||||
		pw_properties_set(props, "sink_properties", NULL);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue