diff options
author | Eduardo Habkost <ehabkost@redhat.com> | 2017-06-08 10:39:04 -0300 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2017-07-13 13:45:53 +0200 |
commit | e79ea67a9785a5da4d1889b6e2bb71d03e916add (patch) | |
tree | 776d9a90e5470ab5cdb0b9cf6da5efaf5f170d4f | |
parent | 57ef3f1278585fbac5f6102362d3c5e066976fdc (diff) |
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>
-rw-r--r-- | io/channel-websock.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/io/channel-websock.c b/io/channel-websock.c index 8fabadea2f..5a3badbec2 100644 --- a/io/channel-websock.c +++ b/io/channel-websock.c @@ -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; } |