From: Peter Maydell Subject: Re: [Qemu-devel] [PATCH v2] xen_disk: cope with missing xenstore "params" node Date: Sat, 25 Jun 2011 23:09:18 +0100 Message-ID: References: <1308933348-12022-1-git-send-email-stefano.stabellini@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <1308933348-12022-1-git-send-email-stefano.stabellini@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: stefano.stabellini@eu.citrix.com Cc: xen-devel@lists.xensource.com, qemu-devel@nongnu.org, agraf@suse.de List-Id: xen-devel@lists.xenproject.org On 24 June 2011 17:35, wrote: > +out_error: > + =C2=A0 =C2=A0qemu_free(blkdev->params); > + =C2=A0 =C2=A0qemu_free(blkdev->mode); > + =C2=A0 =C2=A0qemu_free(blkdev->type); > + =C2=A0 =C2=A0qemu_free(blkdev->dev); > + =C2=A0 =C2=A0qemu_free(blkdev->devtype); > + =C2=A0 =C2=A0return -1; It occured to me that could result in a double-free if it's possible to call init again (or to call free) after the init routine has returned failure. I don't know enough about the Xen device lifecycle to know if that's possible, though -- is it? thanks -- PMM