diff options
author | zhanghailiang <zhang.zhanghailiang@huawei.com> | 2014-11-17 13:54:05 +0800 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2014-11-18 15:04:35 +0000 |
commit | ed6273e26fdfb94a282dbbf1234a75422c6b4c4b (patch) | |
tree | 6cb9958f66858d3ffa605d73584698a6dc66b09c /net/socket.c | |
parent | 1aba4be97eb01b650d146c7f01dc961d55da62ab (diff) |
net: The third parameter of getsockname should be initialized
Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'net/socket.c')
-rw-r--r-- | net/socket.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/socket.c b/net/socket.c index fb21e20a54..ca4b8ba2b3 100644 --- a/net/socket.c +++ b/net/socket.c @@ -352,7 +352,7 @@ static NetSocketState *net_socket_fd_init_dgram(NetClientState *peer, { struct sockaddr_in saddr; int newfd; - socklen_t saddr_len; + socklen_t saddr_len = sizeof(saddr); NetClientState *nc; NetSocketState *s; |