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: Marc Hartmayer <mhartmay@linux.ibm.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
if (VIR_ALLOC(job) < 0)
goto error;
- job->client = client;
+ job->client = virObjectRef(client);
job->msg = msg;
if (prog) {
priority = virNetServerProgramGetPriority(prog, msg->header.proc);
}
- virObjectRef(client);
if (virThreadPoolSendJob(srv->workers, priority, job) < 0) {
virObjectUnref(client);
VIR_FREE(job);