summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
8674c9b)
Check that count is > 0 before allocating pid list. This would
only happen after a prior error, but check it anyway.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
/* For next loop */
one_pid_str = strtok_r(NULL, ",", &iter);
}
/* For next loop */
one_pid_str = strtok_r(NULL, ",", &iter);
}
+ if (count == 0) {
+ ERR("Fatal error occurred when parsing pid string");
+ retval = CMD_ERROR;
+ goto error;
+ }
free(pid_string);
/* Identity of delimiter has been lost in first pass. */
free(pid_string);
/* Identity of delimiter has been lost in first pass. */