提交 6746136a 编写于 作者: P Peter Krempa

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: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NPavel Mores <pmores@redhat.com>
Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
上级 ddce75fa
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册