mirror of
				https://github.com/labwc/labwc.git
				synced 2025-10-29 05:40:24 -04:00 
			
		
		
		
	menu: use xmlFree() for return value of xmlGetProp()
This commit is contained in:
		
							parent
							
								
									5e8df27f84
								
							
						
					
					
						commit
						e6f54a0fc8
					
				
					 1 changed files with 7 additions and 7 deletions
				
			
		|  | @ -487,8 +487,8 @@ fill_item(struct menu *menu, xmlNode *node) | ||||||
| 	append_parsed_actions(node, &item->actions); | 	append_parsed_actions(node, &item->actions); | ||||||
| 
 | 
 | ||||||
| out: | out: | ||||||
| 	free(label); | 	xmlFree(label); | ||||||
| 	free(icon_name); | 	xmlFree(icon_name); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| static void | static void | ||||||
|  | @ -619,10 +619,10 @@ fill_menu(struct server *server, struct menu *parent, xmlNode *n) | ||||||
| 		item->submenu = menu; | 		item->submenu = menu; | ||||||
| 	} | 	} | ||||||
| error: | error: | ||||||
| 	free(label); | 	xmlFree(label); | ||||||
| 	free(icon_name); | 	xmlFree(icon_name); | ||||||
| 	free(execute); | 	xmlFree(execute); | ||||||
| 	free(id); | 	xmlFree(id); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| /* This can be one of <separator> and <separator label=""> */ | /* This can be one of <separator> and <separator label=""> */ | ||||||
|  | @ -631,7 +631,7 @@ fill_separator(struct menu *menu, xmlNode *n) | ||||||
| { | { | ||||||
| 	char *label = (char *)xmlGetProp(n, (const xmlChar *)"label"); | 	char *label = (char *)xmlGetProp(n, (const xmlChar *)"label"); | ||||||
| 	separator_create(menu, label); | 	separator_create(menu, label); | ||||||
| 	free(label); | 	xmlFree(label); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| /* parent==NULL when processing toplevel menus in menu.xml */ | /* parent==NULL when processing toplevel menus in menu.xml */ | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 John Lindgren
						John Lindgren