mirror of
				https://github.com/alsa-project/alsa-lib.git
				synced 2025-11-03 09:01:52 -05:00 
			
		
		
		
	ucm: fix memory leak in the error path (Include)
The included configuration tree must be freed in the error path, too. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
		
							parent
							
								
									7f2d6c3aac
								
							
						
					
					
						commit
						7474518a96
					
				
					 1 changed files with 4 additions and 3 deletions
				
			
		| 
						 | 
					@ -305,13 +305,14 @@ int uc_mgr_evaluate_include(snd_use_case_mgr_t *uc_mgr,
 | 
				
			||||||
		if (a == NULL)
 | 
							if (a == NULL)
 | 
				
			||||||
			continue;
 | 
								continue;
 | 
				
			||||||
		err = uc_mgr_evaluate_inplace(uc_mgr, a);
 | 
							err = uc_mgr_evaluate_inplace(uc_mgr, a);
 | 
				
			||||||
		if (err < 0)
 | 
							if (err < 0) {
 | 
				
			||||||
 | 
								snd_config_delete(a);
 | 
				
			||||||
			return err;
 | 
								return err;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
		err = uc_mgr_config_tree_merge(uc_mgr, parent, a, before, after);
 | 
							err = uc_mgr_config_tree_merge(uc_mgr, parent, a, before, after);
 | 
				
			||||||
 | 
							snd_config_delete(a);
 | 
				
			||||||
		if (err < 0)
 | 
							if (err < 0)
 | 
				
			||||||
			return err;
 | 
								return err;
 | 
				
			||||||
		snd_config_delete(a);
 | 
					 | 
				
			||||||
		
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	return 0;
 | 
						return 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue