提交 b913c8f4 编写于 作者: J John Ferlan

daemon: Don't conditionally free @origErr in daemonStreamEvent

Commit id '0fe4aa14' added @origErr, but since it's assigned outside
the if condition, the free should be outside as well.

Found by Coverity
上级 e484cb3e
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册