From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:35247) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qab2Z-0005MQ-1I for qemu-devel@nongnu.org; Sat, 25 Jun 2011 18:09:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qab2X-00027m-Cp for qemu-devel@nongnu.org; Sat, 25 Jun 2011 18:09:22 -0400 Received: from mail-pz0-f45.google.com ([209.85.210.45]:33511) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qab2W-00027R-OL for qemu-devel@nongnu.org; Sat, 25 Jun 2011 18:09:21 -0400 Received: by pzk30 with SMTP id 30so2577946pzk.4 for ; Sat, 25 Jun 2011 15:09:18 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1308933348-12022-1-git-send-email-stefano.stabellini@eu.citrix.com> References: <1308933348-12022-1-git-send-email-stefano.stabellini@eu.citrix.com> Date: Sat, 25 Jun 2011 23:09:18 +0100 Message-ID: From: Peter Maydell Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2] xen_disk: cope with missing xenstore "params" node List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: stefano.stabellini@eu.citrix.com Cc: xen-devel@lists.xensource.com, qemu-devel@nongnu.org, agraf@suse.de 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