pgrep: avoid SEGV when lightweight and list-full options are used together
do not segfault
This commit is contained in:
parent
a0561fb4eb
commit
0f649e2cd2
2
pgrep.c
2
pgrep.c
@ -629,7 +629,7 @@ static struct el * select_procs (int *num)
|
||||
if (list == NULL)
|
||||
exit (EXIT_FATAL);
|
||||
}
|
||||
if (opt_long) {
|
||||
if (opt_long || opt_longlong) {
|
||||
list[matches].str = xstrdup (cmdoutput);
|
||||
list[matches++].num = subtask.XXXID;
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user