[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-block] [PATCH 1/3] blockjob: fix dead pointer in txn list

From: Vladimir Sementsov-Ogievskiy
Subject: [Qemu-block] [PATCH 1/3] blockjob: fix dead pointer in txn list
Date: Wed, 27 Jul 2016 13:49:48 +0300

Job may be freed in block_job_unref and in this case this would break
transaction QLIST.

Fix this by removing job from this list before unref.

Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
 blockjob.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/blockjob.c b/blockjob.c
index a5ba3be..e045091 100644
--- a/blockjob.c
+++ b/blockjob.c
@@ -216,6 +216,7 @@ static void block_job_completed_single(BlockJob *job)
     job->cb(job->opaque, job->ret);
     if (job->txn) {
+        QLIST_REMOVE(job, txn_list);

reply via email to

[Prev in Thread] Current Thread [Next in Thread]