From 9668fea5dd7e7fc76ada4a0e531bf5d4e363a268 Mon Sep 17 00:00:00 2001 Message-Id: <9668fea5dd7e7fc76ada4a0e531bf5d4e363a268.1376408877.git.minovotn@redhat.com> In-Reply-To: <823d94e906b2aeecd2c60bc9f19ca8948a756f27.1376408877.git.minovotn@redhat.com> References: <823d94e906b2aeecd2c60bc9f19ca8948a756f27.1376408877.git.minovotn@redhat.com> From: Gerd Hoffmann Date: Tue, 30 Jul 2013 11:35:25 +0200 Subject: [PATCH 07/18] qemu-char: don't leak opts on error RH-Author: Gerd Hoffmann Message-id: <1375184130-11076-8-git-send-email-kraxel@redhat.com> Patchwork-id: 52786 O-Subject: [RHEL-6.5 qemu-kvm PATCH 07/12] qemu-char: don't leak opts on error Bugzilla: 676568 RH-Acked-by: Laszlo Ersek RH-Acked-by: Luiz Capitulino RH-Acked-by: Michael S. Tsirkin 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: Michal Novotny --- qemu-char.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-char.c b/qemu-char.c index 1a5f34a..131a851 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2870,7 +2870,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.11.7