diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2016-10-22 13:09:42 +0300 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2016-10-24 15:46:10 +0200 |
commit | ebf4c54d4b24badc88a9f3e23f1540003e1f7cd7 (patch) | |
tree | 713aebcedb75b7b7f71f6794f8cdfc7ee6df0ab6 /qemu-char.c | |
parent | 3aef23d7d8ba559c6e74e931702c63b4c5e23dcd (diff) | |
download | qemu-ebf4c54d4b24badc88a9f3e23f1540003e1f7cd7.zip qemu-ebf4c54d4b24badc88a9f3e23f1540003e1f7cd7.tar.gz qemu-ebf4c54d4b24badc88a9f3e23f1540003e1f7cd7.tar.bz2 |
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>
Diffstat (limited to 'qemu-char.c')
-rw-r--r-- | qemu-char.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/qemu-char.c b/qemu-char.c index 02adea4..5e9684d 100644 --- 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) { |