diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2016-12-08 19:29:35 +0300 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2017-01-31 13:01:47 +0400 |
commit | 1566b0c455c18b2bc3561368f9e9eed5089815eb (patch) | |
tree | 27340c9f3bd6c900c6f811283180db9b95ec7937 /qemu-char.c | |
parent | 4d833ada524d84ff0dbccc63dc9845795205b364 (diff) |
char-win-stdio: convert to finalize
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'qemu-char.c')
-rw-r--r-- | qemu-char.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/qemu-char.c b/qemu-char.c index 390e6a99de..d92642735e 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2594,9 +2594,9 @@ static void qemu_chr_set_echo_win_stdio(Chardev *chr, bool echo) } } -static void win_stdio_free(Chardev *chr) +static void char_win_stdio_finalize(Object *obj) { - WinStdioChardev *stdio = WIN_STDIO_CHARDEV(chr); + WinStdioChardev *stdio = WIN_STDIO_CHARDEV(obj); if (stdio->hInputReadyEvent != INVALID_HANDLE_VALUE) { CloseHandle(stdio->hInputReadyEvent); @@ -2613,6 +2613,7 @@ static const TypeInfo char_win_stdio_type_info = { .name = TYPE_CHARDEV_WIN_STDIO, .parent = TYPE_CHARDEV, .instance_size = sizeof(WinStdioChardev), + .instance_finalize = char_win_stdio_finalize, .abstract = true, }; @@ -3856,7 +3857,6 @@ static void char_stdio_class_init(ObjectClass *oc, void *data) #ifdef _WIN32 cc->chr_write = win_stdio_write; cc->chr_set_echo = qemu_chr_set_echo_win_stdio; - cc->chr_free = win_stdio_free; #else cc->chr_set_echo = qemu_chr_set_echo_stdio; #endif |