projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3aef23d
)
char: use common error path in qmp_chardev_add
author
Marc-André Lureau
<marcandre.lureau@redhat.com>
Sat, 22 Oct 2016 10:09:42 +0000
(13:09 +0300)
committer
Paolo Bonzini
<pbonzini@redhat.com>
Mon, 24 Oct 2016 13:46:10 +0000
(15:46 +0200)
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <
20161022100951
.19562-6-marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
qemu-char.c
patch
|
blob
|
history
diff --git
a/qemu-char.c
b/qemu-char.c
index 02adea41664bd555794c7587527222afec575fad..5e9684d61dde8cee22623b76a7313b414f24158b 100644
(file)
--- a/
qemu-char.c
+++ b/
qemu-char.c
@@
-4752,8
+4752,7
@@
ChardevReturn *qmp_chardev_add(const char *id, ChardevBackend *backend,
chr = qemu_chr_find(id);
if (chr) {
error_setg(errp, "Chardev '%s' already exists", id);
- g_free(ret);
- return NULL;
+ goto out_error;
}
for (i = backends; i; i = i->next) {