mirror of
https://github.com/swaywm/sway.git
synced 2026-06-19 14:33:36 -04:00
commands/bar: Fix memory leak
This commit is contained in:
parent
8441711990
commit
00d3dc8f71
1 changed files with 4 additions and 2 deletions
|
|
@ -23,7 +23,9 @@ static struct cmd_results *parse_single_color(char **color,
|
|||
return error;
|
||||
}
|
||||
if (!*color && !(*color = malloc(10))) {
|
||||
return NULL;
|
||||
if (*color == NULL) {
|
||||
free(color);
|
||||
}
|
||||
}
|
||||
error = add_color(*color, argv[0]);
|
||||
if (error) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue