
On Thu, Mar 26, 2020 at 01:39:41PM +0100, Peter Krempa wrote:
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> --- src/qemu/qemu_blockjob.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/src/qemu/qemu_blockjob.c b/src/qemu/qemu_blockjob.c index 6576f8721f..2032c0c1c5 100644 --- a/src/qemu/qemu_blockjob.c +++ b/src/qemu/qemu_blockjob.c @@ -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 -- 2.24.1
Reviewed-by: Pavel Mores <pmores@redhat.com>