Received: from eggs.gnu.org ([2001:4830:134:3::10]:46675) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1byfbi-0004A4-60 for qemu-devel@nongnu.org; Mon, 24 Oct 2016 09:48:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1byfbh-0006Pt-Fa for qemu-devel@nongnu.org; Mon, 24 Oct 2016 09:48:06 -0400 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]:33141) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1byfbh-0006Pg-9a for qemu-devel@nongnu.org; Mon, 24 Oct 2016 09:48:05 -0400 Received: by mail-wm0-x242.google.com with SMTP id d128so9935888wmf.0 for ; Mon, 24 Oct 2016 06:48:05 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Mon, 24 Oct 2016 15:47:06 +0200 Message-Id: <1477316855-42218-22-git-send-email-pbonzini@redhat.com> In-Reply-To: <1477316855-42218-1-git-send-email-pbonzini@redhat.com> References: <1477316855-42218-1-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PULL 21/50] char: remove use-after-free on win-stdio List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= From: Marc-André Lureau Found by reviewing the code, win_stdio_close() is called by qemu_chr_free() which then call qemu_chr_free_common() taking care of freeing CharDriverState*. Signed-off-by: Marc-André Lureau Message-Id: <20161022095318.17775-3-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini --- qemu-char.c | 1 - 1 file changed, 1 deletion(-) diff --git a/qemu-char.c b/qemu-char.c index d83a896..9165051 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2435,7 +2435,6 @@ static void win_stdio_close(CharDriverState *chr) } g_free(chr->opaque); - g_free(chr); } static CharDriverState *qemu_chr_open_stdio(const char *id, -- 1.8.3.1