aboutsummaryrefslogtreecommitdiff
path: root/net/colo-compare.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/colo-compare.c')
-rw-r--r--net/colo-compare.c20
1 files changed, 3 insertions, 17 deletions
diff --git a/net/colo-compare.c b/net/colo-compare.c
index 63d92cb9da..308368164c 100644
--- a/net/colo-compare.c
+++ b/net/colo-compare.c
@@ -590,12 +590,6 @@ static int find_and_check_chardev(CharDriverState **chr,
return 1;
}
- if (qemu_chr_fe_claim(*chr) < 0) {
- error_setg(errp, "chardev \"%s\" cannot be claimed",
- chr_name);
- return 1;
- }
-
return 0;
}
@@ -707,17 +701,9 @@ static void colo_compare_finalize(Object *obj)
{
CompareState *s = COLO_COMPARE(obj);
- if (s->chr_pri_in.chr) {
- qemu_chr_fe_set_handlers(&s->chr_pri_in, NULL, NULL, NULL, NULL, NULL);
- qemu_chr_fe_release(s->chr_pri_in.chr);
- }
- if (s->chr_sec_in.chr) {
- qemu_chr_fe_set_handlers(&s->chr_sec_in, NULL, NULL, NULL, NULL, NULL);
- qemu_chr_fe_release(s->chr_sec_in.chr);
- }
- if (s->chr_out.chr) {
- qemu_chr_fe_release(s->chr_out.chr);
- }
+ qemu_chr_fe_deinit(&s->chr_pri_in);
+ qemu_chr_fe_deinit(&s->chr_sec_in);
+ qemu_chr_fe_deinit(&s->chr_out);
g_queue_free(&s->conn_list);