mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	Fix some leaks in error cases
This commit is contained in:
		
							parent
							
								
									8669fd03a6
								
							
						
					
					
						commit
						c2028a1695
					
				
					 9 changed files with 43 additions and 22 deletions
				
			
		| 
						 | 
				
			
			@ -442,10 +442,6 @@ static struct endpoint *create_endpoint(struct node *node, struct endpoint *moni
 | 
			
		|||
		return NULL;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	props = pw_properties_new(NULL, NULL);
 | 
			
		||||
	if (props == NULL)
 | 
			
		||||
		return NULL;
 | 
			
		||||
 | 
			
		||||
	if (strstr(media_class, "Source") != NULL) {
 | 
			
		||||
		direction = PW_DIRECTION_OUTPUT;
 | 
			
		||||
	} else if (strstr(media_class, "Sink") != NULL) {
 | 
			
		||||
| 
						 | 
				
			
			@ -455,6 +451,10 @@ static struct endpoint *create_endpoint(struct node *node, struct endpoint *moni
 | 
			
		|||
		return NULL;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	props = pw_properties_new(NULL, NULL);
 | 
			
		||||
	if (props == NULL)
 | 
			
		||||
		return NULL;
 | 
			
		||||
 | 
			
		||||
	if (monitor != NULL) {
 | 
			
		||||
		pw_properties_set(props, PW_KEY_MEDIA_CLASS, "Audio/Source");
 | 
			
		||||
		direction = PW_DIRECTION_OUTPUT;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue