svn commit: r273908 - head/sys/arm/arm

Kevin Lo kevlo at FreeBSD.org
Fri Oct 31 15:07:52 UTC 2014


Author: kevlo
Date: Fri Oct 31 15:07:51 2014
New Revision: 273908
URL: https://svnweb.freebsd.org/changeset/base/273908

Log:
  Fix usage of kern_getenv().

Modified:
  head/sys/arm/arm/machdep.c

Modified: head/sys/arm/arm/machdep.c
==============================================================================
--- head/sys/arm/arm/machdep.c	Fri Oct 31 14:22:26 2014	(r273907)
+++ head/sys/arm/arm/machdep.c	Fri Oct 31 15:07:51 2014	(r273908)
@@ -1246,8 +1246,10 @@ initarm(struct arm_boot_params *abp)
 	print_kenv();
 
 	env = kern_getenv("kernelname");
-	if (env != NULL)
+	if (env != NULL) {
 		strlcpy(kernelname, env, sizeof(kernelname));
+		freeenv(env);
+	}
 
 	if (err_devmap != 0)
 		printf("WARNING: could not fully configure devmap, error=%d\n",


More information about the svn-src-head mailing list