When mux creation fails, object_unparent() drops the last reference
on the base chardev, but 'base' was left dangling. The 'out' label
then passes it to qemu_chardev_set_replay(), causing a
use-after-free.
Set base to NULL after unparent so the replay path is skipped.
Reported-by: Hui Peng <benquike@gmail.com>
Fixes: 4c193bb129 ("chardev: set record/replay on the base device of a muxed device")
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-ID: <20261004-issue-4560-v1-23-ccbef537cbeb@redhat.com>