aboutsummaryrefslogtreecommitdiff
path: root/hw/vfio/migration.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2021-07-20 14:53:58 +0200
committerMarkus Armbruster <armbru@redhat.com>2021-08-26 17:15:28 +0200
commita5c051b2cf11197b1663dfb470e80dbc32d77cd0 (patch)
tree23b1c3b779bf8caf6e72b6001315868ea0c5a050 /hw/vfio/migration.c
parentaa6f7448ebef35249374508c503f53a8859d8a1e (diff)
i386: Never free migration blocker objects instead of sometimes
invtsc_mig_blocker has static storage duration. When a CPU with certain features is initialized, and invtsc_mig_blocker is still null, we add a migration blocker and store it in invtsc_mig_blocker. The object is freed when migrate_add_blocker() fails, leaving invtsc_mig_blocker dangling. It is not freed on later failures. Same for hv_passthrough_mig_blocker and hv_no_nonarch_cs_mig_blocker. All failures are actually fatal, so whether we free or not doesn't really matter, except as bad examples to be copied / imitated. Clean this up in a minimal way: never free these blocker objects. Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Marcelo Tosatti <mtosatti@redhat.com> Cc: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20210720125408.387910-7-armbru@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/vfio/migration.c')
0 files changed, 0 insertions, 0 deletions