Browse Source

GitHub issue #1000

pull/2/head
Adam Ierymenko 7 years ago
parent
commit
1c7b553331
No known key found for this signature in database
GPG Key ID: 1657198823E52A61
  1. 6
      osdep/LinuxNetLink.cpp

6
osdep/LinuxNetLink.cpp

@ -103,7 +103,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);

Loading…
Cancel
Save