diff options
| author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-11-15 01:33:11 -0500 |
|---|---|---|
| committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-11-15 01:33:11 -0500 |
| commit | 1bb95834bbcdc969e477a9284cf96c17a4c2616f (patch) | |
| tree | 9cf66b22a611bb6bc78778c05dac72263bb45a23 /scripts/kconfig/util.c | |
| parent | 85345517fe6d4de27b0d6ca19fef9d28ac947c4a (diff) | |
| parent | a41c73e04673b47730df682446f0d52f95e32a5b (diff) | |
Merge remote branch 'airlied/drm-fixes' into drm-intel-fixes
Diffstat (limited to 'scripts/kconfig/util.c')
| -rw-r--r-- | scripts/kconfig/util.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/kconfig/util.c b/scripts/kconfig/util.c index 78b5c04e736b..6330cc871a47 100644 --- a/scripts/kconfig/util.c +++ b/scripts/kconfig/util.c | |||
| @@ -12,15 +12,18 @@ | |||
| 12 | struct file *file_lookup(const char *name) | 12 | struct file *file_lookup(const char *name) |
| 13 | { | 13 | { |
| 14 | struct file *file; | 14 | struct file *file; |
| 15 | const char *file_name = sym_expand_string_value(name); | ||
| 15 | 16 | ||
| 16 | for (file = file_list; file; file = file->next) { | 17 | for (file = file_list; file; file = file->next) { |
| 17 | if (!strcmp(name, file->name)) | 18 | if (!strcmp(name, file->name)) { |
| 19 | free((void *)file_name); | ||
| 18 | return file; | 20 | return file; |
| 21 | } | ||
| 19 | } | 22 | } |
| 20 | 23 | ||
| 21 | file = malloc(sizeof(*file)); | 24 | file = malloc(sizeof(*file)); |
| 22 | memset(file, 0, sizeof(*file)); | 25 | memset(file, 0, sizeof(*file)); |
| 23 | file->name = strdup(name); | 26 | file->name = file_name; |
| 24 | file->next = file_list; | 27 | file->next = file_list; |
| 25 | file_list = file; | 28 | file_list = file; |
| 26 | return file; | 29 | return file; |
