On Tue, 02 Jun 2026 14:16:12 +0200, Dominik Csapak wrote:
> to prevent a use after free on a client struct, instead of freeing it
> inline in 'cleanup_client', only set a boolean flag 'pending_free'
> and free it in the main 'handle_client' function.
>
> the call graphs look like this:
>
> handle_client
> `-> cleanup_client
> `-> handle_qmp_handshake
> `-> cleanup_client
> `-> send_qmp_cmd
> `-> cleanup_client
> `-> handle_qmp_event
> `-> terminate_check
> `-> send_qmp_cmd
> `-> cleanup_client
> `-> handle_qmp_return
> `-> terminate_check
> `-> send_qmp_cmd
> `-> cleanup_client
>
> [...]
Applied, thanks!
[1/1] fix #7654: prevent use after free
https://git.proxmox.com/?p=qemu-server.git;a=commitdiff;h=fe2fddabc5d25244ed3db7b1e56b21e521685122