qemu-char: don't leak opts on error

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
Gerd Hoffmann 2013-06-24 08:39:51 +02:00 committed by Michael Tokarev
parent ef993ba7bc
commit e668287d44

View File

@ -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) {