migration: Free removed SaveStateEntry

This fixes LeakSanitizer warnings.

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
This commit is contained in:
Akihiko Odaki 2024-06-27 22:37:51 +09:00 committed by Fabiano Rosas
parent c4d242501a
commit c80e22517f
1 changed files with 2 additions and 0 deletions

View File

@ -874,6 +874,8 @@ int vmstate_replace_hack_for_ppc(VMStateIf *obj, int instance_id,
if (se) {
savevm_state_handler_remove(se);
g_free(se->compat);
g_free(se);
}
return vmstate_register(obj, instance_id, vmsd, opaque);
}