X-Git-Url: https://jxself.org/git/?p=carl9170fw.git;a=blobdiff_plain;f=config%2Futil.c;fp=config%2Futil.c;h=a365594770d9daaaaf3220c80eb1522113930072;hp=703ee490461319434ebddba318702c85a9c48e60;hb=d80344204cf1e847cec55a325027fccb2b92db7e;hpb=bd5e9f6c34b6396318f6214c60cc827290830e5f diff --git a/config/util.c b/config/util.c index 703ee49..a365594 100644 --- a/config/util.c +++ b/config/util.c @@ -14,18 +14,16 @@ struct file *file_lookup(const char *name) { struct file *file; - char *file_name = sym_expand_string_value(name); for (file = file_list; file; file = file->next) { if (!strcmp(name, file->name)) { - free(file_name); return file; } } file = xmalloc(sizeof(*file)); memset(file, 0, sizeof(*file)); - file->name = file_name; + file->name = xstrdup(name); file->next = file_list; file_list = file; return file;