mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-10-29 05:40:27 -04:00 
			
		
		
		
	protocol-native: fail when security context init fails
This commit is contained in:
		
							parent
							
								
									6499b8572e
								
							
						
					
					
						commit
						232f4f01e4
					
				
					 1 changed files with 6 additions and 1 deletions
				
			
		|  | @ -1630,7 +1630,8 @@ static void module_destroy(void *data) | ||||||
| { | { | ||||||
| 	struct protocol_data *d = data; | 	struct protocol_data *d = data; | ||||||
| 
 | 
 | ||||||
| 	protocol_native_security_context_free(d->security); | 	if (d->security) | ||||||
|  | 		protocol_native_security_context_free(d->security); | ||||||
| 	spa_hook_remove(&d->module_listener); | 	spa_hook_remove(&d->module_listener); | ||||||
| 	pw_properties_free(d->props); | 	pw_properties_free(d->props); | ||||||
| 
 | 
 | ||||||
|  | @ -1828,6 +1829,10 @@ int pipewire__module_init(struct pw_impl_module *module, const char *args_str) | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	d->security = protocol_native_security_context_init(module, this); | 	d->security = protocol_native_security_context_init(module, this); | ||||||
|  | 	if (d->security == NULL) { | ||||||
|  | 		res = -errno; | ||||||
|  | 		goto error_cleanup; | ||||||
|  | 	} | ||||||
| 
 | 
 | ||||||
| 	props = pw_context_get_properties(context); | 	props = pw_context_get_properties(context); | ||||||
| 	pw_properties_update_keys(d->props, &props->dict, keys); | 	pw_properties_update_keys(d->props, &props->dict, keys); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Wim Taymans
						Wim Taymans