On Mon, 18 Feb 2019 13:06:54 +0000 Jean-Philippe Brucker <jean-philippe.brucker@xxxxxxx> wrote: > 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. That's correct, qcow1 and qcow2 share the same qcow_disk_close() function, which references the list. > Signed-off-by: Jean-Philippe Brucker <jean-philippe.brucker@xxxxxxx> Reviewed-by: Andre Przywara <andre.przywara@xxxxxxx> Cheers, Andre. > --- > disk/qcow.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/disk/qcow.c b/disk/qcow.c > index 64cf9270a..bed70c65c 100644 > --- a/disk/qcow.c > +++ b/disk/qcow.c > @@ -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)