]> xenbits.xensource.com Git - libvirt.git/commit
virStream*All: Call virStreamAbort() more frequently
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 1 Jun 2017 06:20:31 +0000 (08:20 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 11 Jul 2017 06:57:05 +0000 (08:57 +0200)
commit6f8aa8e8dabb4c1e91af605a2dbe78935323b956
tree56020fe1ab1f7722c1819d083af208fe3d8f0b74
parent0fe4aa149f35fcca9d4029d5be8a0f3967d46fd5
virStream*All: Call virStreamAbort() more frequently

Our documentation to the virStreamRecvAll, virStreamSendAll,
virStreamSparseRecvAll, and virStreamSparseSendAll functions
indicates that if these functions fail, then virStreamAbort is
called. But that is not necessarily true. For instance all of
these functions allocate a buffer to work with. If the allocation
fails, no virStreamAbort() is called despite -1 being returned.
It's the same story with argument sanity checks and a lot of
other checks.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
src/libvirt-stream.c