Commit 0398f964 authored by Dong Anyuan's avatar Dong Anyuan

Fix Coverity Scan CID 300459 (Using uninitialized value addr. Field...

Fix Coverity Scan CID 300459 (Using uninitialized value addr. Field addr.sin_zero is uninitialized when calling bind.)
parent 15672687
...@@ -53,6 +53,7 @@ socket_link_t *new_link_server(int port) ...@@ -53,6 +53,7 @@ socket_link_t *new_link_server(int port)
int no_delay; int no_delay;
memset(&addr,0,sizeof(struct sockaddr_in));
ret = calloc(1, sizeof(socket_link_t)); ret = calloc(1, sizeof(socket_link_t));
if (ret == NULL) { if (ret == NULL) {
LOG_E(MAC, "%s:%d: out of memory\n", __FILE__, __LINE__); LOG_E(MAC, "%s:%d: out of memory\n", __FILE__, __LINE__);
......
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