mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	module-echo-cancel: fix leak on error
Don't leak the properties on error. Use and log the error returned from the init function.
This commit is contained in:
		
							parent
							
								
									d06e13210d
								
							
						
					
					
						commit
						6769becac5
					
				
					 1 changed files with 7 additions and 5 deletions
				
			
		| 
						 | 
				
			
			@ -995,14 +995,16 @@ int pipewire__module_init(struct pw_impl_module *module, const char *args)
 | 
			
		|||
	else
 | 
			
		||||
		aec_props = pw_properties_new(NULL, NULL);
 | 
			
		||||
 | 
			
		||||
	if (spa_audio_aec_init(impl->aec, &aec_props->dict, &impl->info)) {
 | 
			
		||||
		pw_log_error("codec plugin %s create failed", impl->aec->name);
 | 
			
		||||
		res = -ENOENT;
 | 
			
		||||
		goto error;
 | 
			
		||||
	}
 | 
			
		||||
	res = spa_audio_aec_init(impl->aec, &aec_props->dict, &impl->info);
 | 
			
		||||
 | 
			
		||||
	pw_properties_free(aec_props);
 | 
			
		||||
 | 
			
		||||
	if (res < 0) {
 | 
			
		||||
		pw_log_error("codec plugin %s create failed: %s", impl->aec->name,
 | 
			
		||||
				spa_strerror(res));
 | 
			
		||||
		goto error;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if (impl->aec->latency) {
 | 
			
		||||
		unsigned int num, denom, req_num, req_denom;
 | 
			
		||||
		unsigned int factor = 0;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue