aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/kern_environment.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/kern_environment.c')
-rw-r--r--sys/kern/kern_environment.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/kern/kern_environment.c b/sys/kern/kern_environment.c
index 54992e6594ed..8dc345559e95 100644
--- a/sys/kern/kern_environment.c
+++ b/sys/kern/kern_environment.c
@@ -365,7 +365,11 @@ init_dynamic_kenv_from(char *init_env, int *curpos)
kenvp[i] = malloc(len, M_KENV, M_WAITOK);
strcpy(kenvp[i++], cp);
sanitize:
+#ifdef PRESERVE_EARLY_KENV
+ continue;
+#else
explicit_bzero(cp, len - 1);
+#endif
}
*curpos = i;
}