qemu-socket: zero-initialize SocketAddress

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
Gerd Hoffmann 2013-06-24 08:39:44 +02:00 committed by Michael Tokarev
parent 36125631e7
commit afde3f8b99
1 changed files with 2 additions and 2 deletions

View File

@ -848,9 +848,9 @@ int unix_nonblocking_connect(const char *path,
SocketAddress *socket_parse(const char *str, Error **errp)
{
SocketAddress *addr = NULL;
SocketAddress *addr;
addr = g_new(SocketAddress, 1);
addr = g_new0(SocketAddress, 1);
if (strstart(str, "unix:", NULL)) {
if (str[5] == '\0') {
error_setg(errp, "invalid Unix socket address");