diff options
author | Dominique Martinet <asmadeus@codewreck.org> | 2018-07-01 23:09:17 +0900 |
---|---|---|
committer | Dominique Martinet <asmadeus@codewreck.org> | 2018-07-02 08:03:41 +0900 |
commit | 6d2b82253a5f2fb0ab8e63ded2b62e5d4088e63b (patch) | |
tree | d5eda2fc6dec9c357c40d044daa9fd3fada8eb01 | |
parent | f0d1d263204287b4e0f22368c046cefbbb92cb25 (diff) |
bar_cmd_font: fix leak of font
join_args is a freshly allocated string and can be used as is.
Found through static analysis.
-rw-r--r-- | sway/commands/bar/font.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/commands/bar/font.c b/sway/commands/bar/font.c index 80b7a593..f036cbc3 100644 --- a/sway/commands/bar/font.c +++ b/sway/commands/bar/font.c @@ -14,7 +14,7 @@ struct cmd_results *bar_cmd_font(int argc, char **argv) { } char *font = join_args(argv, argc); 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", config->current_bar->font, config->current_bar->id); return cmd_results_new(CMD_SUCCESS, NULL, NULL); |