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:
parent
12cef6e0fc
commit
91e1ee29ec
1 changed files with 2 additions and 1 deletions
|
@ -175,8 +175,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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue