cryptospore / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
218e99
From 9a03ecd49c63fdad85a073834b29748a7b12824e Mon Sep 17 00:00:00 2001
218e99
From: Gerd Hoffmann <kraxel@redhat.com>
218e99
Date: Mon, 14 Oct 2013 13:35:17 +0200
218e99
Subject: [PATCH 10/18] qemu-char: don't leak opts on error
218e99
218e99
RH-Author: Gerd Hoffmann <kraxel@redhat.com>
218e99
Message-id: <1381757723-23134-10-git-send-email-kraxel@redhat.com>
218e99
Patchwork-id: 54852
218e99
O-Subject: [RHEL-7 qemu-kvm PATCH 09/15] qemu-char: 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 e668287d4413395be1a0f9ef292bb6d0c1006e29)
218e99
---
218e99
 qemu-char.c | 2 +-
218e99
 1 file changed, 1 insertion(+), 1 deletion(-)
218e99
218e99
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
218e99
---
218e99
 qemu-char.c |    2 +-
218e99
 1 files changed, 1 insertions(+), 1 deletions(-)
218e99
218e99
diff --git a/qemu-char.c b/qemu-char.c
218e99
index 62fafb0..43bd5e2 100644
218e99
--- a/qemu-char.c
218e99
+++ b/qemu-char.c
218e99
@@ -3205,7 +3205,7 @@ CharDriverState *qemu_chr_new_from_opts(QemuOpts *opts,
218e99
     if (i == NULL) {
218e99
         error_setg(errp, "chardev: backend \"%s\" not found",
218e99
                    qemu_opt_get(opts, "backend"));
218e99
-        return NULL;
218e99
+        goto err;
218e99
     }
218e99
 
218e99
     if (!cd->open) {
218e99
-- 
218e99
1.7.1
218e99