summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoravg <avg@FreeBSD.org>2012-09-11 06:18:36 +0000
committeravg <avg@FreeBSD.org>2012-09-11 06:18:36 +0000
commit78789cf4a8e5c11b6508bd8203f04fce151250fa (patch)
tree29485b70c67f79a71a2701545ed71f9fbf97819c
parent041ab8a455b31a8df2262ffe5738e7c2f77c45dd (diff)
downloadFreeBSD-src-78789cf4a8e5c11b6508bd8203f04fce151250fa.zip
FreeBSD-src-78789cf4a8e5c11b6508bd8203f04fce151250fa.tar.gz
boot: file_loadraw should strdup name argument
... the same way it's done for type argument. MFC after: 2 weeks
-rw-r--r--sys/boot/common/module.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/boot/common/module.c b/sys/boot/common/module.c
index 12ffe6e..fed788d 100644
--- a/sys/boot/common/module.c
+++ b/sys/boot/common/module.c
@@ -396,7 +396,7 @@ file_loadraw(char *type, char *name)
/* Looks OK so far; create & populate control structure */
fp = file_alloc();
- fp->f_name = name;
+ fp->f_name = strdup(name);
fp->f_type = strdup(type);
fp->f_args = NULL;
fp->f_metadata = NULL;
OpenPOWER on IntegriCloud