diff options
author | Kirti Wankhede <kwankhede@nvidia.com> | 2020-11-06 23:32:24 +0530 |
---|---|---|
committer | Alex Williamson <alex.williamson@redhat.com> | 2020-11-12 15:58:16 -0700 |
commit | e408aeef8663fd6e3075aef252404c55d710a75e (patch) | |
tree | 5c6594e4754d67dad8fb72306d1976e9995f9e42 /hw/vfio | |
parent | cb5d19e8294486551c422759260883ed290226d9 (diff) |
Fix use after free in vfio_migration_probe
Fixes Coverity issue:
CID 1436126: Memory - illegal accesses (USE_AFTER_FREE)
Fixes: a9e271ec9b36 ("vfio: Add migration region initialization and finalize function")
Signed-off-by: Kirti Wankhede <kwankhede@nvidia.com>
Reviewed-by: David Edmondson <dme@dme.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'hw/vfio')
-rw-r--r-- | hw/vfio/migration.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/vfio/migration.c b/hw/vfio/migration.c index 3ce285ea39..55261562d4 100644 --- a/hw/vfio/migration.c +++ b/hw/vfio/migration.c @@ -897,8 +897,8 @@ int vfio_migration_probe(VFIODevice *vbasedev, Error **errp) goto add_blocker; } - g_free(info); trace_vfio_migration_probe(vbasedev->name, info->index); + g_free(info); return 0; add_blocker: |