aboutsummaryrefslogtreecommitdiff
path: root/monitor.c
diff options
context:
space:
mode:
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/monitor.c b/monitor.c
index 1c6f28fca6..5c349c5bf5 100644
--- a/monitor.c
+++ b/monitor.c
@@ -582,9 +582,7 @@ static void monitor_data_init(Monitor *mon)
static void monitor_data_destroy(Monitor *mon)
{
- if (mon->chr.chr) {
- qemu_chr_fe_set_handlers(&mon->chr, NULL, NULL, NULL, NULL, NULL);
- }
+ qemu_chr_fe_deinit(&mon->chr);
if (monitor_is_qmp(mon)) {
json_message_parser_destroy(&mon->qmp.parser);
}