diff options
Diffstat (limited to 'job-qmp.c')
-rw-r--r-- | job-qmp.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -114,7 +114,16 @@ void qmp_job_finalize(const char *id, Error **errp) } trace_qmp_job_finalize(job); + job_ref(job); job_finalize(job, errp); + + /* + * Job's context might have changed via job_finalize (and job_txn_apply + * automatically acquires the new one), so make sure we release the correct + * one. + */ + aio_context = job->aio_context; + job_unref(job); aio_context_release(aio_context); } |