Fix issues found by -fsanitize=thread.

This commit is contained in:
Kareem Abuobeid
2020-09-30 14:21:00 -07:00
parent 20d28e1b65
commit d59784e646
3 changed files with 22 additions and 7 deletions

View File

@@ -1099,7 +1099,17 @@ static void* DoMonitor(void* arg)
}
if (FD_ISSET(crl->mfd, &readfds)) {
word64 r64;
int rlen;
WOLFSSL_MSG("got custom shutdown event, breaking out");
/* read out the bytes written to the event to clean up */
rlen = (int) read(crl->mfd, &r64, sizeof(r64));
if (rlen < 0) {
WOLFSSL_MSG("read custom event failure");
}
break;
}