mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-12 07:42:56 +00:00
daemon: Don't conditionally free @origErr in daemonStreamEvent
Commit id '0fe4aa149' added @origErr, but since it's assigned outside the if condition, the free should be outside as well. Found by Coverity
This commit is contained in:
parent
e484cb3eca
commit
b913c8f453
@ -239,7 +239,6 @@ daemonStreamEvent(virStreamPtr st, int events, void *opaque)
|
||||
virStreamAbort(stream->st);
|
||||
if (origErr && origErr->code != VIR_ERR_OK) {
|
||||
virSetError(origErr);
|
||||
virFreeError(origErr);
|
||||
} else {
|
||||
if (events & VIR_STREAM_EVENT_HANGUP)
|
||||
virReportError(VIR_ERR_RPC,
|
||||
@ -248,6 +247,7 @@ daemonStreamEvent(virStreamPtr st, int events, void *opaque)
|
||||
virReportError(VIR_ERR_RPC,
|
||||
"%s", _("stream had I/O failure"));
|
||||
}
|
||||
virFreeError(origErr);
|
||||
|
||||
msg = virNetMessageNew(false);
|
||||
if (!msg) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user