From: Markus Armbruster Date: Thu, 27 Jun 2013 13:25:12 +0000 (+0200) Subject: qemu-char: Fix ID reuse after chardev-remove for qapi-based init X-Git-Tag: TizenStudio_2.0_p2.3.2~208^2~1647 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2ea3e2c1e85097c45a882dbc1fbba4a7fdb3ff1c;p=sdk%2Femulator%2Fqemu.git qemu-char: Fix ID reuse after chardev-remove for qapi-based init Commit 2c5f488 introduced qapi-based character device initialization as a new code path in qemu_chr_new_from_opts(). Unfortunately, it failed to store parameter opts in the new chardev. Therefore, qemu_chr_delete() doesn't delete it. Even though the device is gone, its options linger, and any attempt to create another one with the same ID fails. Cc: qemu-stable@nongnu.org Signed-off-by: Markus Armbruster Reviewed-by: Gerd Hoffmann Message-id: 1372339512-28149-1-git-send-email-armbru@redhat.com Signed-off-by: Anthony Liguori --- diff --git a/qemu-char.c b/qemu-char.c index a030e6b..63972ae 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -3219,6 +3219,7 @@ CharDriverState *qemu_chr_new_from_opts(QemuOpts *opts, } chr = qemu_chr_find(id); + chr->opts = opts; qapi_out: qapi_free_ChardevBackend(backend);