Fix a memory allocation issue
This commit is contained in:
parent
82c9ff2850
commit
97b141d267
|
@ -100,7 +100,7 @@ namespace gr
|
||||||
}
|
}
|
||||||
|
|
||||||
/* All good until now. Allocate buffer memory and proceed */
|
/* All good until now. Allocate buffer memory and proceed */
|
||||||
buf = new uint8_t(d_mtu);
|
buf = new uint8_t[d_mtu];
|
||||||
|
|
||||||
while(d_running){
|
while(d_running){
|
||||||
ret = recvfrom(sock, buf, d_mtu, 0, &client_addr, &client_addr_len);
|
ret = recvfrom(sock, buf, d_mtu, 0, &client_addr, &client_addr_len);
|
||||||
|
@ -115,7 +115,7 @@ namespace gr
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
close(sock);
|
close(sock);
|
||||||
delete buf;
|
delete[] buf;
|
||||||
exit (EXIT_SUCCESS);
|
exit (EXIT_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue