Merge remote-tracking branch 'origin/dev' into multipath

This commit is contained in:
Joseph Henry 2019-08-14 11:25:40 -07:00
commit 15e44f0ddd
3 changed files with 11 additions and 2 deletions

View file

@ -105,7 +105,11 @@ void LinuxNetLink::_setSocketTimeout(int fd, int seconds)
#define ZT_NL_BUF_SIZE 16384
int LinuxNetLink::_doRecv(int fd)
{
char *const buf = (char *)valloc(ZT_NL_BUF_SIZE);
char *buf = nullptr;
if (posix_memalign((void **)&buf,16,ZT_NL_BUF_SIZE) != 0) {
fprintf(stderr,"malloc failed!\n");
::exit(1);
}
if (!buf) {
fprintf(stderr,"malloc failed!\n");
::exit(1);