4
Fork 0

Memory leak fixed

This commit is contained in:
Artem Prilutskiy 2016-08-04 14:03:20 +03:00
parent 442dfe2aa3
commit 830f13fc82

View file

@ -475,7 +475,9 @@ int main(int argc, const char* argv[])
#endif
// Prepare uplink buffers
// Prepare buffers
void* controlBuffer = alloca(BUFFER_SIZE);
struct RewindData* incomingBuffer = (struct RewindData*)alloca(sizeof(struct RewindData) + BUFFER_SIZE);
struct RewindData* outgoingBuffer = (struct RewindData*)alloca(sizeof(struct RewindData) + BUFFER_SIZE);
@ -649,7 +651,7 @@ int main(int argc, const char* argv[])
message.msg_namelen = sizeof(address);
message.msg_iov = &vector;
message.msg_iovlen = 1;
message.msg_control = alloca(BUFFER_SIZE);
message.msg_control = controlBuffer;
message.msg_controllen = BUFFER_SIZE;
message.msg_flags = 0;