svn commit: r241196 - head/usr.sbin/jail

Jamie Gritton jamie at FreeBSD.org
Thu Oct 4 18:59:47 UTC 2012


Author: jamie
Date: Thu Oct  4 18:59:46 2012
New Revision: 241196
URL: http://svn.freebsd.org/changeset/base/241196

Log:
  Move properly to the next parameter when jailparam_init fails
   (i.e. on an unknown parameter), to avoid freeing bogus pointers.

Modified:
  head/usr.sbin/jail/config.c

Modified: head/usr.sbin/jail/config.c
==============================================================================
--- head/usr.sbin/jail/config.c	Thu Oct  4 15:42:45 2012	(r241195)
+++ head/usr.sbin/jail/config.c	Thu Oct  4 18:59:46 2012	(r241196)
@@ -690,6 +690,7 @@ import_params(struct cfjail *j)
 		if (jailparam_init(jp, p->name) < 0) {
 			error = -1;
 			jail_warnx(j, "%s", jail_errmsg);
+			jp++;
 			continue;
 		}
 		if (TAILQ_EMPTY(&p->val))


More information about the svn-src-all mailing list