提交 a5493c47 编写于 作者: M Marc Hartmayer 提交者: Cole Robinson

rpc: use the return value of virObjectRef directly

Use the return value of virObjectRef directly. This way, it's easier
for another reader to identify the reason why the additional reference
is required.
Signed-off-by: NMarc Hartmayer <mhartmay@linux.ibm.com>
Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
上级 d2406f57
......@@ -199,7 +199,7 @@ virNetServerDispatchNewMessage(virNetServerClientPtr client,
if (VIR_ALLOC(job) < 0)
goto error;
job->client = client;
job->client = virObjectRef(client);
job->msg = msg;
if (prog) {
......@@ -207,7 +207,6 @@ virNetServerDispatchNewMessage(virNetServerClientPtr client,
priority = virNetServerProgramGetPriority(prog, msg->header.proc);
}
virObjectRef(client);
if (virThreadPoolSendJob(srv->workers, priority, job) < 0) {
virObjectUnref(client);
VIR_FREE(job);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册