diff options
-rw-r--r-- | bin/ps/keyword.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/ps/keyword.c b/bin/ps/keyword.c index 6a6b277..af33593 100644 --- a/bin/ps/keyword.c +++ b/bin/ps/keyword.c @@ -219,7 +219,7 @@ parsefmt(p) while ((cp = strsep(&p, FMTSEP)) != NULL && *cp == '\0') /* void */; - if (!(v = findvar(cp))) + if (cp == NULL || !(v = findvar(cp))) continue; if ((vent = malloc(sizeof(struct varent))) == NULL) err(1, NULL); |