aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2013-06-24 08:39:44 +0200
committerMichael Tokarev <mjt@tls.msk.ru>2013-06-28 22:10:33 +0400
commitafde3f8b9923892d21a735993f533e5d8b60e0b0 (patch)
tree9994398bea6d9ba7c8eba485bce655d7568690e2
parent36125631e79d53ffb9365740f43f386e2171d116 (diff)
downloadqemu-afde3f8b9923892d21a735993f533e5d8b60e0b0.zip
qemu-afde3f8b9923892d21a735993f533e5d8b60e0b0.tar.gz
qemu-afde3f8b9923892d21a735993f533e5d8b60e0b0.tar.bz2
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>
-rw-r--r--util/qemu-sockets.c4
1 files 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");