svn commit: r192981 - stable/7/sys/compat/linux
Dmitry Chagin
dchagin at FreeBSD.org
Thu May 28 16:05:23 UTC 2009
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);
More information about the svn-src-stable
mailing list