summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2013-06-27 15:25:12 +0200
committerMichael Roth <mdroth@linux.vnet.ibm.com>2013-08-12 17:28:07 -0500
commit39b04be6ad88cd77ed87ac1f2fb5d38f3ae9fde6 (patch)
treebda395e52f3d8048e21246903b3a121d26b8a3ff
parent1eeacd413af165d672b474c5420a3877052b573a (diff)
downloadqemu-39b04be6ad88cd77ed87ac1f2fb5d38f3ae9fde6.tar.gz
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 <armbru@redhat.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 1372339512-28149-1-git-send-email-armbru@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 2ea3e2c1e85097c45a882dbc1fbba4a7fdb3ff1c) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
-rw-r--r--qemu-char.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/qemu-char.c b/qemu-char.c
index efe706df3f..b8ffcba42f 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -3228,6 +3228,7 @@ CharDriverState *qemu_chr_new_from_opts(QemuOpts *opts,
}
chr = qemu_chr_find(id);
+ chr->opts = opts;
qapi_out:
qapi_free_ChardevBackend(backend);