X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fprocesses.c;h=9d8bc01d468eb088c65845e119dde4d9c4584d1f;hb=90ac9957e95378d729bce1c00bb0ef2efadab33e;hp=29492ac2ff6347bb0427249056907ca947fa01d1;hpb=785feb9d2544aff7f561fbda30aa762eec9e07bc;p=collectd.git diff --git a/src/processes.c b/src/processes.c index 29492ac2..9d8bc01d 100644 --- a/src/processes.c +++ b/src/processes.c @@ -510,11 +510,14 @@ static int *ps_read_tasks (int pid) closedir (dh); + if (list_len == 0) + return (NULL); + assert (list_len < list_size); assert (list[list_len] == 0); return (list); -} +} /* int *ps_read_tasks */ int ps_read_process (int pid, procstat_t *ps, char *state) {