mirror of
https://github.com/qemu/qemu.git
synced 2024-11-25 11:53:39 +08:00
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:
parent
ef993ba7bc
commit
e668287d44
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user