From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 08:14:08 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0C0BE100; Wed, 3 Sep 2014 08:14:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EBF5D1F26; Wed, 3 Sep 2014 08:14:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s838E7C0084258; Wed, 3 Sep 2014 08:14:07 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s838E7A2084257; Wed, 3 Sep 2014 08:14:07 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201409030814.s838E7A2084257@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 3 Sep 2014 08:14:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270999 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 08:14:08 -0000 Author: glebius Date: Wed Sep 3 08:14:07 2014 New Revision: 270999 URL: http://svnweb.freebsd.org/changeset/base/270999 Log: Fix dereference after NULL check. CID: 1234607 Sponsored by: Nginx, Inc. Modified: head/sys/kern/kern_proc.c Modified: head/sys/kern/kern_proc.c ============================================================================== --- head/sys/kern/kern_proc.c Wed Sep 3 08:13:46 2014 (r270998) +++ head/sys/kern/kern_proc.c Wed Sep 3 08:14:07 2014 (r270999) @@ -921,10 +921,11 @@ fill_kinfo_proc_only(struct proc *p, str kp->ki_xstat = p->p_xstat; kp->ki_acflag = p->p_acflag; kp->ki_lock = p->p_lock; - if (p->p_pptr) + if (p->p_pptr) { kp->ki_ppid = proc_realparent(p)->p_pid; - if (p->p_flag & P_TRACED) - kp->ki_tracer = p->p_pptr->p_pid; + if (p->p_flag & P_TRACED) + kp->ki_tracer = p->p_pptr->p_pid; + } } /*