Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 Aug 2009 12:50:08 +0000 (UTC)
From:      Stanislav Sedov <stas@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r196014 - projects/libprocstat/sys/kern
Message-ID:  <200908011250.n71Co8Nm081334@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: stas
Date: Sat Aug  1 12:50:07 2009
New Revision: 196014
URL: http://svn.freebsd.org/changeset/base/196014

Log:
  - Do not try to process the NULL controlling tty vnode.

Modified:
  projects/libprocstat/sys/kern/kern_descrip.c

Modified: projects/libprocstat/sys/kern/kern_descrip.c
==============================================================================
--- projects/libprocstat/sys/kern/kern_descrip.c	Sat Aug  1 11:40:46 2009	(r196013)
+++ projects/libprocstat/sys/kern/kern_descrip.c	Sat Aug  1 12:50:07 2009	(r196014)
@@ -3001,7 +3001,8 @@ sysctl_kern_proc_filedesc(SYSCTL_HANDLER
 	cttyvp = NULL;
 	if (p->p_pgrp != NULL && p->p_pgrp->pg_session != NULL) {
 		cttyvp = p->p_pgrp->pg_session->s_ttyvp;
-		vref(cttyvp);
+		if (cttyvp != NULL)
+			vref(cttyvp);
 	}
 	fdp = fdhold(p);
 	PROC_UNLOCK(p);



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