Found by Coverity:
CID
1292557 (#1 of 1): Wrong sizeof argument
(SIZEOF_MISMATCH)suspicious_sizeof: Passing argument 8UL /* sizeof
(*_pid_list) */ to function zmalloc and then casting the return value to
int * is suspicious.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
goto error;
}
if (all) {
- pid_list = zmalloc(sizeof(*_pid_list));
+ pid_list = zmalloc(sizeof(*pid_list));
if (!pid_list) {
ERR("Out of memory");
retval = CMD_ERROR;