char: remove use-after-free on win-stdio

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 <marcandre.lureau@redhat.com>
Message-Id: <20161022095318.17775-3-marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Marc-André Lureau 2016-10-22 12:52:42 +03:00 committed by Paolo Bonzini
parent 2c9bf30bdf
commit ba60e727b0
1 changed files with 0 additions and 1 deletions

View File

@ -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,