Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 May 2009 16:05:23 +0000 (UTC)
From:      Dmitry Chagin <dchagin@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r192981 - stable/7/sys/compat/linux
Message-ID:  <200905281605.n4SG5NQw042738@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dchagin
Date: Thu May 28 16:05:22 2009
New Revision: 192981
URL: http://svn.freebsd.org/changeset/base/192981

Log:
  Direct commit. Fix error introduced in my r192950 merge.
  Osrel variable should be initialized before use.
  
  Pointyhat to:	me
  
  Approved by:	kib (mentor)

Modified:
  stable/7/sys/compat/linux/linux_mib.c

Modified: stable/7/sys/compat/linux/linux_mib.c
==============================================================================
--- stable/7/sys/compat/linux/linux_mib.c	Thu May 28 15:41:41 2009	(r192980)
+++ stable/7/sys/compat/linux/linux_mib.c	Thu May 28 16:05:22 2009	(r192981)
@@ -267,11 +267,9 @@ linux_kernver(struct thread *td)
 	int osrel;
 
 	pr = td->td_ucred->cr_prison;
-	if (pr != NULL) {
-		if (pr->pr_linux != NULL) {
-			lpr = (struct linux_prison *)pr->pr_linux;
-			osrel = lpr->pr_osrel;
-		}
+	if (pr != NULL && pr->pr_linux != NULL) {
+		lpr = (struct linux_prison *)pr->pr_linux;
+		osrel = lpr->pr_osrel;
 	} else
 		osrel = linux_osrel;
 	return (osrel);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905281605.n4SG5NQw042738>