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) {
|
if (i == NULL) {
|
||||||
error_setg(errp, "chardev: backend \"%s\" not found",
|
error_setg(errp, "chardev: backend \"%s\" not found",
|
||||||
qemu_opt_get(opts, "backend"));
|
qemu_opt_get(opts, "backend"));
|
||||||
return NULL;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!cd->open) {
|
if (!cd->open) {
|
||||||
|
Loading…
Reference in New Issue
Block a user