mirror of
				https://github.com/labwc/labwc.git
				synced 2025-11-03 09:01:51 -05:00 
			
		
		
		
	common/xml.c: fix memory leak in lab_xml_get_bool()
This commit is contained in:
		
							parent
							
								
									508df093c4
								
							
						
					
					
						commit
						d87ef7568a
					
				
					 1 changed files with 1 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -190,6 +190,7 @@ lab_xml_get_bool(xmlNode *node, const char *key, bool *b)
 | 
			
		|||
	if (get_node(node, key, &child, /* leaf_only */ true)) {
 | 
			
		||||
		char *s = (char *)xmlNodeGetContent(child);
 | 
			
		||||
		int ret = parse_bool(s, -1);
 | 
			
		||||
		xmlFree(s);
 | 
			
		||||
		if (ret >= 0) {
 | 
			
		||||
			*b = ret;
 | 
			
		||||
			return true;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue