thebeanogamer / rpms / qemu-kvm

Forked from rpms/qemu-kvm 5 months ago
Clone
Blob Blame History Raw
From 9a03ecd49c63fdad85a073834b29748a7b12824e Mon Sep 17 00:00:00 2001
From: Gerd Hoffmann <kraxel@redhat.com>
Date: Mon, 14 Oct 2013 13:35:17 +0200
Subject: [PATCH 10/18] qemu-char: don't leak opts on error
RH-Author: Gerd Hoffmann <kraxel@redhat.com>
Message-id: <1381757723-23134-10-git-send-email-kraxel@redhat.com>
Patchwork-id: 54852
O-Subject: [RHEL-7 qemu-kvm PATCH 09/15] qemu-char: don't leak opts on error
Bugzilla: 922010
RH-Acked-by: Hans de Goede <hdegoede@redhat.com>
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
(cherry picked from commit e668287d4413395be1a0f9ef292bb6d0c1006e29)
---
qemu-char.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
qemu-char.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/qemu-char.c b/qemu-char.c
index 62fafb0..43bd5e2 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -3205,7 +3205,7 @@ CharDriverState *qemu_chr_new_from_opts(QemuOpts *opts,
if (i == NULL) {
error_setg(errp, "chardev: backend \"%s\" not found",
qemu_opt_get(opts, "backend"));
- return NULL;
+ goto err;
}
if (!cd->open) {
--
1.7.1