mirror of
https://github.com/qemu/qemu.git
synced 2024-11-24 11:23:43 +08:00
websock: Don't try to set *errp directly
Assigning directly to *errp is not valid, as errp may be NULL, &error_fatal, or &error_abort. Use error_propagate() instead. Cc: "Daniel P. Berrange" <berrange@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20170608133906.12737-4-ehabkost@redhat.com> Reviewed-by: Manos Pitsidianakis <el13635@mail.ntua.gr> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
parent
57ef3f1278
commit
e79ea67a97
@ -856,7 +856,7 @@ static ssize_t qio_channel_websock_readv(QIOChannel *ioc,
|
||||
ssize_t ret;
|
||||
|
||||
if (wioc->io_err) {
|
||||
*errp = error_copy(wioc->io_err);
|
||||
error_propagate(errp, error_copy(wioc->io_err));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -902,7 +902,7 @@ static ssize_t qio_channel_websock_writev(QIOChannel *ioc,
|
||||
ssize_t ret;
|
||||
|
||||
if (wioc->io_err) {
|
||||
*errp = error_copy(wioc->io_err);
|
||||
error_propagate(errp, error_copy(wioc->io_err));
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user