mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
Make sure kern_envp is never NULL. If we don't get a pointer to
the environment from the loader, use the static environment.
This commit is contained in:
parent
11f8548a0d
commit
5910f6cc85
1 changed files with 4 additions and 3 deletions
|
|
@ -586,10 +586,11 @@ ia64_init(void)
|
|||
preload_metadata = (caddr_t)bootinfo.bi_modulep;
|
||||
else
|
||||
metadata_missing = 1;
|
||||
if (envmode == 1)
|
||||
kern_envp = static_env;
|
||||
else
|
||||
|
||||
if (envmode == 0 && bootinfo.bi_envp)
|
||||
kern_envp = (caddr_t)bootinfo.bi_envp;
|
||||
else
|
||||
kern_envp = static_env;
|
||||
|
||||
/*
|
||||
* Look at arguments passed to us and compute boothowto.
|
||||
|
|
|
|||
Loading…
Reference in a new issue