From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:50444) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOmNN-0006lX-70 for qemu-devel@nongnu.org; Thu, 18 Oct 2012 05:26:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TOmNH-0001sx-FE for qemu-devel@nongnu.org; Thu, 18 Oct 2012 05:26:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44442) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOmNH-0001sn-5S for qemu-devel@nongnu.org; Thu, 18 Oct 2012 05:26:43 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q9I9QgIC005645 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 18 Oct 2012 05:26:42 -0400 Message-ID: <507FCB4F.7020909@redhat.com> Date: Thu, 18 Oct 2012 11:26:39 +0200 From: Gerd Hoffmann MIME-Version: 1.0 References: <1350468595-5238-1-git-send-email-kraxel@redhat.com> <1350468595-5238-3-git-send-email-kraxel@redhat.com> <20121017134026.3e4c5aa0@doriath.home> In-Reply-To: <20121017134026.3e4c5aa0@doriath.home> Content-Type: text/plain; charset=ISO-8859-1 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: Luiz Capitulino Cc: qemu-devel@nongnu.org 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 ... cheers, Gerd