mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	tests: cleanup correctly to avoid leaks
This commit is contained in:
		
							parent
							
								
									c2ba66bef6
								
							
						
					
					
						commit
						9c072832f0
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -105,7 +105,7 @@ static void test_create(void)
 | 
			
		|||
	spa_assert_se(context != NULL);
 | 
			
		||||
	core = pw_context_connect(context, NULL, 0);
 | 
			
		||||
	if (core == NULL && errno == EHOSTDOWN)
 | 
			
		||||
		return;
 | 
			
		||||
		goto cleanup;
 | 
			
		||||
	spa_assert_se(core != NULL);
 | 
			
		||||
 | 
			
		||||
	spa_zero(info);
 | 
			
		||||
| 
						 | 
				
			
			@ -155,6 +155,7 @@ static void test_create(void)
 | 
			
		|||
	pw_proxy_destroy((struct pw_proxy*)info.sec);
 | 
			
		||||
	pw_proxy_destroy((struct pw_proxy*)info.registry);
 | 
			
		||||
 | 
			
		||||
cleanup:
 | 
			
		||||
	pw_context_destroy(context);
 | 
			
		||||
	pw_main_loop_destroy(loop);
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue