From 9a03ecd49c63fdad85a073834b29748a7b12824e Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann 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 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 RH-Acked-by: Laszlo Ersek RH-Acked-by: Paolo Bonzini Signed-off-by: Gerd Hoffmann Reviewed-by: Laszlo Ersek Signed-off-by: Michael Tokarev (cherry picked from commit e668287d4413395be1a0f9ef292bb6d0c1006e29) --- qemu-char.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Signed-off-by: Miroslav Rezanina --- 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