mirror of https://github.com/xemu-project/xemu.git
migration: finalize current_migration object
current_migration has .instance_finalize callback, but it is not called, because nobody unrefs current_migration. Fix that. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Peter Xu <peterx@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
parent
bae416e5ba
commit
1f8956041a
|
@ -44,6 +44,7 @@ void dump_vmstate_json_to_file(FILE *out_fp);
|
||||||
|
|
||||||
/* migration/migration.c */
|
/* migration/migration.c */
|
||||||
void migration_object_init(void);
|
void migration_object_init(void);
|
||||||
|
void migration_object_finalize(void);
|
||||||
void qemu_start_incoming_migration(const char *uri, Error **errp);
|
void qemu_start_incoming_migration(const char *uri, Error **errp);
|
||||||
bool migration_is_idle(void);
|
bool migration_is_idle(void);
|
||||||
void add_migration_state_change_notifier(Notifier *notify);
|
void add_migration_state_change_notifier(Notifier *notify);
|
||||||
|
|
|
@ -132,6 +132,11 @@ void migration_object_init(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void migration_object_finalize(void)
|
||||||
|
{
|
||||||
|
object_unref(OBJECT(current_migration));
|
||||||
|
}
|
||||||
|
|
||||||
/* For outgoing */
|
/* For outgoing */
|
||||||
MigrationState *migrate_get_current(void)
|
MigrationState *migrate_get_current(void)
|
||||||
{
|
{
|
||||||
|
|
1
vl.c
1
vl.c
|
@ -4792,6 +4792,7 @@ int main(int argc, char **argv, char **envp)
|
||||||
monitor_cleanup();
|
monitor_cleanup();
|
||||||
qemu_chr_cleanup();
|
qemu_chr_cleanup();
|
||||||
user_creatable_cleanup();
|
user_creatable_cleanup();
|
||||||
|
migration_object_finalize();
|
||||||
/* TODO: unref root container, check all devices are ok */
|
/* TODO: unref root container, check all devices are ok */
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue