summaryrefslogtreecommitdiffstats
path: root/bin/ps
diff options
context:
space:
mode:
authorsteve <steve@FreeBSD.org>1997-08-11 02:29:50 +0000
committersteve <steve@FreeBSD.org>1997-08-11 02:29:50 +0000
commit6cd5fcd54b701fa5699b918a862ba94fe376acfa (patch)
treeea2253dde783ae979f62353142f2cda6730eb4b8 /bin/ps
parentf880a4a55fed03e20dda357d9a4e7746c55157df (diff)
downloadFreeBSD-src-6cd5fcd54b701fa5699b918a862ba94fe376acfa.zip
FreeBSD-src-6cd5fcd54b701fa5699b918a862ba94fe376acfa.tar.gz
Fix seg fault when invalid keywords are used.
PR: bin/4253 Submitted by: Jesse Rosenstock <jmr@ugcs.caltech.edu>
Diffstat (limited to 'bin/ps')
-rw-r--r--bin/ps/keyword.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/bin/ps/keyword.c b/bin/ps/keyword.c
index bd045e6..78bab68 100644
--- a/bin/ps/keyword.c
+++ b/bin/ps/keyword.c
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: keyword.c,v 1.14 1997/03/04 00:33:56 ache Exp $
+ * $Id: keyword.c,v 1.15 1997/04/29 05:26:04 jkh Exp $
*/
#ifndef lint
@@ -386,8 +386,7 @@ findvar(p)
if (!v) {
warnx("%s: keyword not found", p);
eval = 1;
- }
- if (hp)
+ } else if (hp)
v->header = hp;
return (v);
}
OpenPOWER on IntegriCloud