From ed6273e26fdfb94a282dbbf1234a75422c6b4c4b Mon Sep 17 00:00:00 2001 From: zhanghailiang Date: Mon, 17 Nov 2014 13:54:05 +0800 Subject: [PATCH] net: The third parameter of getsockname should be initialized Signed-off-by: zhanghailiang Reviewed-by: Markus Armbruster Signed-off-by: Stefan Hajnoczi --- net/socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.11.4.GIT