summaryrefslogtreecommitdiff
path: root/package/config/util.c
diff options
context:
space:
mode:
authorPeter Korsgaard <jacmet@sunsite.dk>2011-02-02 11:48:58 +0100
committerPeter Korsgaard <jacmet@sunsite.dk>2011-02-02 15:54:50 +0100
commit72daa122b6a4a9562109299d0b747c71aac1e483 (patch)
treecc1dff80e1e89158b0cac778433fcea5c08ae5f9 /package/config/util.c
parent359a922659c6b33c44ab7c4f94de7d801a8bea63 (diff)
package/config: rebase against 2.6.37-rc1
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/config/util.c')
-rw-r--r--package/config/util.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/package/config/util.c b/package/config/util.c
index b15dbab33..5fc36c7d2 100644
--- a/package/config/util.c
+++ b/package/config/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;