commands/bar: Fix memory leak

This commit is contained in:
afr30010 2019-08-16 10:49:42 +01:00
parent 8441711990
commit 00d3dc8f71

View file

@ -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) {