X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=scripts%2Fkconfig%2Futil.c;h=6330cc871a471495e6820be441c96ea61c6886a1;hb=edb2877f4a62647e36e20839a786f94d688a06ed;hp=78b5c04e736bcfad3f25d7f85fe2b5660572cb52;hpb=c6774bcd33b21d57457d4c604388670efdf03258;p=~andy%2Flinux diff --git a/scripts/kconfig/util.c b/scripts/kconfig/util.c index 78b5c04e736..6330cc871a4 100644 --- a/scripts/kconfig/util.c +++ b/scripts/kconfig/util.c @@ -12,15 +12,18 @@ struct file *file_lookup(const char *name) { struct file *file; + const char *file_name = sym_expand_string_value(name); for (file = file_list; file; file = file->next) { - if (!strcmp(name, file->name)) + if (!strcmp(name, file->name)) { + free((void *)file_name); return file; + } } file = malloc(sizeof(*file)); memset(file, 0, sizeof(*file)); - file->name = strdup(name); + file->name = file_name; file->next = file_list; file_list = file; return file;