qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 6/8] qcow2: Fix order of refcount updates in qco


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH 6/8] qcow2: Fix order of refcount updates in qcow2_snapshot_goto
Date: Fri, 18 Nov 2011 16:28:14 +0000

On Thu, Nov 17, 2011 at 3:13 PM, Kevin Wolf <address@hidden> wrote:
> -    /* FIXME This is too late! */
> -    ret = qcow2_update_snapshot_refcount(bs, s->l1_table_offset, s->l1_size, 
> 1);
> +    if (ret < 0) {
> +        goto fail;
> +    }
> +
> +    g_free(sn_l1_table);

Prevent double-free if qcow2_update_snapshot_refcount() fails below:

sn_l1_table = NULL;

Stefan



reply via email to

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