cryptospore / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
218e99
From ea210ca7017b87a1c7bf02050d6c60dcac17f54b Mon Sep 17 00:00:00 2001
218e99
From: Gerd Hoffmann <kraxel@redhat.com>
218e99
Date: Mon, 14 Oct 2013 13:35:22 +0200
218e99
Subject: [PATCH 15/18] qemu-socket: don't leak opts on error
218e99
218e99
RH-Author: Gerd Hoffmann <kraxel@redhat.com>
218e99
Message-id: <1381757723-23134-15-git-send-email-kraxel@redhat.com>
218e99
Patchwork-id: 54858
218e99
O-Subject: [RHEL-7 qemu-kvm PATCH 14/15] qemu-socket: don't leak opts on error
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 7a5b6af13a45ae7109900dee03a436819302126c)
218e99
---
218e99
 util/qemu-sockets.c | 2 +-
218e99
 1 file changed, 1 insertion(+), 1 deletion(-)
218e99
218e99
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
218e99
---
218e99
 util/qemu-sockets.c |    2 +-
218e99
 1 files changed, 1 insertions(+), 1 deletions(-)
218e99
218e99
diff --git a/util/qemu-sockets.c b/util/qemu-sockets.c
218e99
index 126cbb6..095716e 100644
218e99
--- a/util/qemu-sockets.c
218e99
+++ b/util/qemu-sockets.c
218e99
@@ -963,7 +963,7 @@ int socket_dgram(SocketAddress *remote, SocketAddress *local, Error **errp)
218e99
 
218e99
     default:
218e99
         error_setg(errp, "socket type unsupported for datagram");
218e99
-        return -1;
218e99
+        fd = -1;
218e99
     }
218e99
     qemu_opts_del(opts);
218e99
     return fd;
218e99
-- 
218e99
1.7.1
218e99