projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a684f3c
)
chardev: handle qmp_chardev_add(KIND_MUX) failure
author
Gerd Hoffmann
<kraxel@redhat.com>
Fri, 13 Sep 2013 10:48:47 +0000
(12:48 +0200)
committer
Gerd Hoffmann
<kraxel@redhat.com>
Tue, 1 Oct 2013 08:16:04 +0000
(10:16 +0200)
Cc: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
qemu-char.c
patch
|
blob
|
history
diff --git
a/qemu-char.c
b/qemu-char.c
index f7f5464b67635a7044f8725db60b37363be7675c..2ca34cd71025b0a02d4b2149cba77b6d6197645c 100644
(file)
--- a/
qemu-char.c
+++ b/
qemu-char.c
@@
-3271,7
+3271,12
@@
CharDriverState *qemu_chr_new_from_opts(QemuOpts *opts,
backend->kind = CHARDEV_BACKEND_KIND_MUX;
backend->mux->chardev = g_strdup(bid);
ret = qmp_chardev_add(id, backend, errp);
- assert(!error_is_set(errp));
+ if (error_is_set(errp)) {
+ chr = qemu_chr_find(bid);
+ qemu_chr_delete(chr);
+ chr = NULL;
+ goto qapi_out;
+ }
}
chr = qemu_chr_find(id);