aboutsummaryrefslogtreecommitdiff
path: root/hw/vfio
diff options
context:
space:
mode:
authorKirti Wankhede <kwankhede@nvidia.com>2020-11-06 23:32:24 +0530
committerAlex Williamson <alex.williamson@redhat.com>2020-11-12 15:58:16 -0700
commite408aeef8663fd6e3075aef252404c55d710a75e (patch)
tree5c6594e4754d67dad8fb72306d1976e9995f9e42 /hw/vfio
parentcb5d19e8294486551c422759260883ed290226d9 (diff)
downloadqemu-e408aeef8663fd6e3075aef252404c55d710a75e.zip
qemu-e408aeef8663fd6e3075aef252404c55d710a75e.tar.gz
qemu-e408aeef8663fd6e3075aef252404c55d710a75e.tar.bz2
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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/vfio/migration.c b/hw/vfio/migration.c
index 3ce285e..5526156 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: