From afde3f8b9923892d21a735993f533e5d8b60e0b0 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Mon, 24 Jun 2013 08:39:44 +0200 Subject: qemu-socket: zero-initialize SocketAddress Signed-off-by: Gerd Hoffmann Reviewed-by: Laszlo Ersek Signed-off-by: Michael Tokarev --- util/qemu-sockets.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util/qemu-sockets.c b/util/qemu-sockets.c index 96eca2a..86fb09c 100644 --- a/util/qemu-sockets.c +++ b/util/qemu-sockets.c @@ -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"); -- cgit v1.1