Commit 97b141d2 authored by Manolis Surligas's avatar Manolis Surligas

Fix a memory allocation issue

parent 82c9ff28
......@@ -100,7 +100,7 @@ namespace gr
}
/* All good until now. Allocate buffer memory and proceed */
buf = new uint8_t(d_mtu);
buf = new uint8_t[d_mtu];
while(d_running){
ret = recvfrom(sock, buf, d_mtu, 0, &client_addr, &client_addr_len);
......@@ -115,7 +115,7 @@ namespace gr
}
}
close(sock);
delete buf;
delete[] buf;
exit (EXIT_SUCCESS);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment