Received: from eggs.gnu.org ([2001:4830:134:3::10]:57444) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUChW-0002DB-OH for qemu-devel@nongnu.org; Mon, 01 Aug 2016 08:52:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bUChR-00014D-P0 for qemu-devel@nongnu.org; Mon, 01 Aug 2016 08:52:09 -0400 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]:36358) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUChR-000147-I2 for qemu-devel@nongnu.org; Mon, 01 Aug 2016 08:52:05 -0400 Received: by mail-wm0-x242.google.com with SMTP id x83so26004989wma.3 for ; Mon, 01 Aug 2016 05:52:05 -0700 (PDT) Sender: Paolo Bonzini References: <20160728143808.13707-1-marcandre.lureau@redhat.com> <20160728143808.13707-21-marcandre.lureau@redhat.com> <73a3724b-8625-852e-fa83-4b61529b2ccc@redhat.com> From: Paolo Bonzini Message-ID: Date: Mon, 1 Aug 2016 14:52:01 +0200 MIME-Version: 1.0 In-Reply-To: <73a3724b-8625-852e-fa83-4b61529b2ccc@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH v2 20/37] char: free MuxDriver when closing List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: marcandre.lureau@redhat.com, qemu-devel@nongnu.org On 01/08/2016 14:50, Paolo Bonzini wrote: > > > On 28/07/2016 16:37, marcandre.lureau@redhat.com wrote: >> From: Marc-André Lureau >> >> Similarly to other chr_close callbacks, free char type specific data. >> >> Signed-off-by: Marc-André Lureau >> --- >> qemu-char.c | 9 +++++++++ >> 1 file changed, 9 insertions(+) >> >> diff --git a/qemu-char.c b/qemu-char.c >> index 6ed6dd6..e276485 100644 >> --- a/qemu-char.c >> +++ b/qemu-char.c >> @@ -786,6 +786,14 @@ static GSource *mux_chr_add_watch(CharDriverState *s, GIOCondition cond) >> return d->drv->chr_add_watch(d->drv, cond); >> } >> >> +static void mux_chr_close(struct CharDriverState *chr) >> +{ >> + MuxDriver *d = chr->opaque; >> + >> + /* is more cleanup needed? */ > > Perhaps qemu_chr_free(d->drv)? Hmm, no, a qemu_chr_delete(mux) could conceivably delete d->drv too, but not a free. So the patch is okay with the comment removed. Paolo