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:
Eduardo Habkost 2017-06-08 10:39:04 -03:00 committed by Markus Armbruster
parent 57ef3f1278
commit e79ea67a97

View File

@ -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;
}