mirror of https://gitee.com/openkylin/libvirt.git
vz: remove redundant NULL pointer check
The 'dom' pointer is already dereferenced earlier. src/vz/vz_sdk.c:249:24: warning: Either the condition 'if(dom)' is redundant or there is possible null pointer dereference: dom. [nullPointerRedundantCheck] Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
aeecac61e8
commit
bb5a4844ba
|
@ -256,11 +256,11 @@ waitDomainJobHelper(PRL_HANDLE job, virDomainObjPtr dom, unsigned int timeout,
|
|||
}
|
||||
|
||||
pdom->job.sdkJob = job;
|
||||
if (dom)
|
||||
virObjectUnlock(dom);
|
||||
|
||||
virObjectUnlock(dom);
|
||||
ret = waitJobHelper(job, timeout, filename, funcname, linenr);
|
||||
if (dom)
|
||||
virObjectLock(dom);
|
||||
virObjectLock(dom);
|
||||
|
||||
pdom->job.sdkJob = NULL;
|
||||
|
||||
return ret;
|
||||
|
|
Loading…
Reference in New Issue