cryptospore / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
218e99
From aa57fbfca8a627f38b2d22585c8d410b7d512231 Mon Sep 17 00:00:00 2001
218e99
From: Gerd Hoffmann <kraxel@redhat.com>
218e99
Date: Mon, 14 Oct 2013 13:35:09 +0200
218e99
Subject: [PATCH 02/18] qemu-socket: zero-initialize SocketAddress
218e99
218e99
RH-Author: Gerd Hoffmann <kraxel@redhat.com>
218e99
Message-id: <1381757723-23134-2-git-send-email-kraxel@redhat.com>
218e99
Patchwork-id: 54863
218e99
O-Subject: [RHEL-7 qemu-kvm PATCH 01/15] qemu-socket: zero-initialize SocketAddress
218e99
Bugzilla: 922010
218e99
RH-Acked-by: Hans de Goede <hdegoede@redhat.com>
218e99
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
218e99
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
218e99
218e99
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
218e99
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
218e99
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
218e99
(cherry picked from commit afde3f8b9923892d21a735993f533e5d8b60e0b0)
218e99
---
218e99
 util/qemu-sockets.c | 4 ++--
218e99
 1 file changed, 2 insertions(+), 2 deletions(-)
218e99
218e99
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
218e99
---
218e99
 util/qemu-sockets.c |    4 ++--
218e99
 1 files changed, 2 insertions(+), 2 deletions(-)
218e99
218e99
diff --git a/util/qemu-sockets.c b/util/qemu-sockets.c
218e99
index 96eca2a..86fb09c 100644
218e99
--- a/util/qemu-sockets.c
218e99
+++ b/util/qemu-sockets.c
218e99
@@ -848,9 +848,9 @@ int unix_nonblocking_connect(const char *path,
218e99
 
218e99
 SocketAddress *socket_parse(const char *str, Error **errp)
218e99
 {
218e99
-    SocketAddress *addr = NULL;
218e99
+    SocketAddress *addr;
218e99
 
218e99
-    addr = g_new(SocketAddress, 1);
218e99
+    addr = g_new0(SocketAddress, 1);
218e99
     if (strstart(str, "unix:", NULL)) {
218e99
         if (str[5] == '\0') {
218e99
             error_setg(errp, "invalid Unix socket address");
218e99
-- 
218e99
1.7.1
218e99