From e668287d4413395be1a0f9ef292bb6d0c1006e29 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Mon, 24 Jun 2013 08:39:51 +0200 Subject: [PATCH] qemu-char: don't leak opts on error Signed-off-by: Gerd Hoffmann Reviewed-by: Laszlo Ersek Signed-off-by: Michael Tokarev --- qemu-char.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-char.c b/qemu-char.c index 371f6308c5..0cda56cbca 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -3178,7 +3178,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) {