summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--color.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/color.c b/color.c
index aefc3ff..9806b52 100644
--- a/color.c
+++ b/color.c
@@ -432,14 +432,14 @@ struct colors *parse_colors(const char *ls_colors) {
break;
}
- char *key = strndup(chunk, equals - chunk);
- if (!key) {
+ char *value = unescape(equals + 1, ':', &next);
+ if (!value) {
continue;
}
- char *value = unescape(equals + 1, ':', &next);
- if (!value) {
- free(key);
+ char *key = strndup(chunk, equals - chunk);
+ if (!key) {
+ dstrfree(value);
continue;
}