mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-01 17:35:17 +00:00
qemuBlockJobRefreshJobs: Warn readers that 'job' may be invalid after update
Add a comment noting that job update can cause the pointer to be invalid and thus should not be accessed after. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Pavel Mores <pmores@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
ddce75fac0
commit
6746136a27
@ -571,6 +571,7 @@ qemuBlockJobRefreshJobs(virQEMUDriverPtr driver,
|
||||
|
||||
if (job->newstate != -1)
|
||||
qemuBlockJobUpdate(vm, job, QEMU_ASYNC_JOB_NONE);
|
||||
/* 'job' may be invalid after this update */
|
||||
}
|
||||
|
||||
/* remove data for job which qemu didn't report (the algorithm is
|
||||
|
Loading…
x
Reference in New Issue
Block a user