[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/4] qcow2: Move reading nb_snapshots in qcow2_o
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH 1/4] qcow2: Move reading nb_snapshots in qcow2_open |
Date: |
Tue, 19 Nov 2013 13:46:32 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 |
On 11/17/2013 07:18 AM, Max Reitz wrote:
> Any goto fail between having read nb_snapshots (returning a non-zero
> value) and allocating s->snapshots (through qcow2_read_snapshots())
> results in qcow2_free_snapshots() being called, dereferencing
> s->snapshots which is still NULL.
>
> Fix this by moving the reading of nb_snapshots right before the call to
> qcow2_read_snapshots().
>
> Signed-off-by: Max Reitz <address@hidden>
> ---
> block/qcow2.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Are you intending this series as a bug fix for 1.7?
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature