On Thu, Aug 17, 2023 at 3:33 PM <t...@chinatelecom.cn> wrote:
>
> From: Guoyi Tu <t...@chinatelecom.cn>
>
> Input handler resource should be released when
> VDAgentChardev object finalize
>
> Signed-off-by: Guoyi Tu <t...@chinatelecom.cn>
> Signed-off-by: dengpengcheng <dengp...@chinatelecom.cn>

Reviewed-by: Marc-André Lureau <marcandre.lur...@redhat.com>

> ---
>  ui/vdagent.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/ui/vdagent.c b/ui/vdagent.c
> index 386dc5abe0..4c9b3b7ba8 100644
> --- a/ui/vdagent.c
> +++ b/ui/vdagent.c
> @@ -924,6 +924,9 @@ static void vdagent_chr_fini(Object *obj)
>  {
>      VDAgentChardev *vd = QEMU_VDAGENT_CHARDEV(obj);
>
> +    if (vd->mouse_hs) {
> +        qemu_input_handler_unregister(vd->mouse_hs);
> +    }
>      migrate_del_blocker(vd->migration_blocker);
>      buffer_free(&vd->outbuf);
>      error_free(vd->migration_blocker);
> --
> 2.27.0
>
>


-- 
Marc-André Lureau

Reply via email to