From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:48697) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOqAL-0005HV-6s for qemu-devel@nongnu.org; Thu, 18 Oct 2012 09:29:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TOqAG-00089N-8c for qemu-devel@nongnu.org; Thu, 18 Oct 2012 09:29:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:18647) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOqAG-00089B-0X for qemu-devel@nongnu.org; Thu, 18 Oct 2012 09:29:32 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q9IDTUSq031903 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 18 Oct 2012 09:29:30 -0400 Date: Thu, 18 Oct 2012 10:30:25 -0300 From: Luiz Capitulino Message-ID: <20121018103025.54051f1f@doriath.home> In-Reply-To: <507FCB4F.7020909@redhat.com> References: <1350468595-5238-1-git-send-email-kraxel@redhat.com> <1350468595-5238-3-git-send-email-kraxel@redhat.com> <20121017134026.3e4c5aa0@doriath.home> <507FCB4F.7020909@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/3] chardev: fix QemuOpts lifecycle List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: qemu-devel@nongnu.org On Thu, 18 Oct 2012 11:26:39 +0200 Gerd Hoffmann wrote: > Hi, > > >> @@ -2864,6 +2868,7 @@ void qemu_chr_delete(CharDriverState *chr) > >> chr->chr_close(chr); > >> g_free(chr->filename); > >> g_free(chr->label); > >> + qemu_opts_del(chr->opts); > >> g_free(chr); > >> } > > > > Didn't consider this in my first review, but is chardev_init_func() fine > > with this? Basically, if we chardev_remove a device created by it (is this > > possible?) then the opts will be freed but it will remain inserted in its > > QemuOptsList. > > Hmm? Don't see your issue here. > qemu_opts_del will also unlink from QemuOptsList ... Missed that fact, thanks for clarifying: Reviewed-by: Luiz Capitulino