svn commit: r298465 - stable/10/sys/ddb
Konstantin Belousov
kib at FreeBSD.org
Fri Apr 22 08:49:52 UTC 2016
Author: kib
Date: Fri Apr 22 08:49:50 2016
New Revision: 298465
URL: https://svnweb.freebsd.org/changeset/base/298465
Log:
MFC r298043:
Avoid NULL pointer dereference.
Modified:
stable/10/sys/ddb/db_ps.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/ddb/db_ps.c
==============================================================================
--- stable/10/sys/ddb/db_ps.c Fri Apr 22 08:11:26 2016 (r298464)
+++ stable/10/sys/ddb/db_ps.c Fri Apr 22 08:49:50 2016 (r298465)
@@ -181,7 +181,8 @@ db_ps(db_expr_t addr, boolean_t hasaddr,
strlcat(state, "V", sizeof(state));
if (p->p_flag & P_SYSTEM || p->p_lock > 0)
strlcat(state, "L", sizeof(state));
- if (p->p_session != NULL && SESS_LEADER(p))
+ if (p->p_pgrp != NULL && p->p_session != NULL &&
+ SESS_LEADER(p))
strlcat(state, "s", sizeof(state));
/* Cheated here and didn't compare pgid's. */
if (p->p_flag & P_CONTROLT)
More information about the svn-src-all
mailing list