mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	bar_cmd_font: fix leak of font
join_args is a freshly allocated string and can be used as is. Found through static analysis.
This commit is contained in:
		
							parent
							
								
									f0d1d26320
								
							
						
					
					
						commit
						6d2b82253a
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -14,7 +14,7 @@ struct cmd_results *bar_cmd_font(int argc, char **argv) {
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	char *font = join_args(argv, argc);
 | 
						char *font = join_args(argv, argc);
 | 
				
			||||||
	free(config->current_bar->font);
 | 
						free(config->current_bar->font);
 | 
				
			||||||
	config->current_bar->font = strdup(font);
 | 
						config->current_bar->font = font;
 | 
				
			||||||
	wlr_log(L_DEBUG, "Settings font '%s' for bar: %s",
 | 
						wlr_log(L_DEBUG, "Settings font '%s' for bar: %s",
 | 
				
			||||||
			config->current_bar->font, config->current_bar->id);
 | 
								config->current_bar->font, config->current_bar->id);
 | 
				
			||||||
	return cmd_results_new(CMD_SUCCESS, NULL, NULL);
 | 
						return cmd_results_new(CMD_SUCCESS, NULL, NULL);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue