mirror of https://gitee.com/openkylin/qemu.git
char: use common error path in qmp_chardev_add
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>
This commit is contained in:
parent
3aef23d7d8
commit
ebf4c54d4b
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue