mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-04-16 12:06:55 +02:00
GitHub issue #1000
This commit is contained in:
parent
a0fb519696
commit
1c7b553331
1 changed files with 5 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue