Commit ca14d9ed authored by Jean-Philippe Brucker's avatar Jean-Philippe Brucker Committed by Will Deacon
Browse files

qcow: Fix qcow1 exit fault



Even though qcow1 doesn't use the refcount table, the cleanup path still
attempts to iterate over its LRU list. Initialize the list to avoid a
segfault on exit.
Reviewed-by: Andre Przywara's avatarAndre Przywara <andre.przywara@arm.com>
Signed-off-by: default avatarJean-Philippe Brucker <jean-philippe.brucker@arm.com>
Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
parent 20b65266
......@@ -1437,6 +1437,7 @@ static struct disk_image *qcow1_probe(int fd, bool readonly)
l1t->root = (struct rb_root)RB_ROOT;
INIT_LIST_HEAD(&l1t->lru_list);
INIT_LIST_HEAD(&q->refcount_table.lru_list);
h = q->header = qcow1_read_header(fd);
if (!h)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment