1
0
Fork 0
mirror of https://github.com/albfan/miraclecast.git synced 2025-03-09 23:38:56 +00:00

miracle-wifid: fix call waitid() with NULL pointer issue reported by valgrind

This commit is contained in:
Derek Dai 2016-12-15 14:26:13 +08:00 committed by edurenye
parent 6fdaa07603
commit d314b90b01

View file

@ -181,8 +181,9 @@ static int manager_signal_fn(sd_event_source *source,
struct manager *m = data;
if (ssi->ssi_signo == SIGCHLD) {
siginfo_t info;
log_debug("caught SIGCHLD for %ld, reaping child", (long)ssi->ssi_pid);
waitid(P_PID, ssi->ssi_pid, NULL, WNOHANG|WEXITED);
waitid(P_PID, ssi->ssi_pid, &info, WNOHANG|WEXITED);
return 0;
} else if (ssi->ssi_signo == SIGPIPE) {
/* ignore SIGPIPE */