mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	spa-device: fix leak of properties in error case
This commit is contained in:
		
							parent
							
								
									d3748ef254
								
							
						
					
					
						commit
						d871adbd4d
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -147,6 +147,7 @@ error_interface:
 | 
			
		|||
	pw_log_error("can't get device interface %d", res);
 | 
			
		||||
	goto error_exit_unload;
 | 
			
		||||
error_device:
 | 
			
		||||
	properties = NULL;
 | 
			
		||||
	res = -errno;
 | 
			
		||||
	pw_log_error("can't create device: %m");
 | 
			
		||||
	goto error_exit_unload;
 | 
			
		||||
| 
						 | 
				
			
			@ -155,5 +156,7 @@ error_exit_unload:
 | 
			
		|||
	pw_unload_spa_handle(handle);
 | 
			
		||||
error_exit:
 | 
			
		||||
	errno = -res;
 | 
			
		||||
	if (properties)
 | 
			
		||||
		pw_properties_free(properties);
 | 
			
		||||
	return NULL;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue