diff options
Diffstat (limited to 'qemu-char.c')
-rw-r--r-- | qemu-char.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/qemu-char.c b/qemu-char.c index 908e7124eb..c4eb4eea31 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -3876,9 +3876,8 @@ void qemu_chr_fe_release(CharDriverState *s) s->avail_connections++; } -void qemu_chr_delete(CharDriverState *chr) +void qemu_chr_free(CharDriverState *chr) { - QTAILQ_REMOVE(&chardevs, chr, next); if (chr->chr_close) { chr->chr_close(chr); } @@ -3888,6 +3887,12 @@ void qemu_chr_delete(CharDriverState *chr) g_free(chr); } +void qemu_chr_delete(CharDriverState *chr) +{ + QTAILQ_REMOVE(&chardevs, chr, next); + qemu_chr_free(chr); +} + ChardevInfoList *qmp_query_chardev(Error **errp) { ChardevInfoList *chr_list = NULL; |