From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59005) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c6aly-00066X-ND for qemu-devel@nongnu.org; Tue, 15 Nov 2016 05:15:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c6alu-0005Uh-Qn for qemu-devel@nongnu.org; Tue, 15 Nov 2016 05:15:26 -0500 Received: from 10.mo53.mail-out.ovh.net ([87.98.189.210]:36041) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c6alu-0005UJ-LR for qemu-devel@nongnu.org; Tue, 15 Nov 2016 05:15:22 -0500 Received: from player158.ha.ovh.net (b7.ovh.net [213.186.33.57]) by mo53.mail-out.ovh.net (Postfix) with ESMTP id 8351E4290F for ; Tue, 15 Nov 2016 11:15:21 +0100 (CET) Date: Tue, 15 Nov 2016 11:15:19 +0100 From: Greg Kurz Message-ID: <20161115111519.66713493@bahia> In-Reply-To: <582a6738.968c6b0a.ad67a.9505@mx.google.com> References: <582a6738.968c6b0a.ad67a.9505@mx.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] 9pfs: adjust the order of resource cleanup in device unrealize List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Li Qiang Cc: qemu-devel@nongnu.org Hi Li, Please incorporate this patch in your cleanup series since it depends on it. On Mon, 14 Nov 2016 20:38:57 -0500 Li Qiang wrote: > From: Li Qiang > > Unrealize should undo things that were set during realize in > reverse order. This is what this patch does. > So should do the error path in realize actually. :) > Signed-off-by: Li Qiang > --- > hw/9pfs/9p.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c > index aea7e9d..f7e14ac 100644 > --- a/hw/9pfs/9p.c > +++ b/hw/9pfs/9p.c > @@ -3530,8 +3530,8 @@ out: > > void v9fs_device_unrealize_common(V9fsState *s, Error **errp) > { > - g_free(s->ctx.fs_root); > g_free(s->tag); > + g_free(s->ctx.fs_root); > } > > typedef struct VirtfsCoResetData {