diff options
author | Kirti Wankhede | 2020-11-06 19:02:24 +0100 |
---|---|---|
committer | Alex Williamson | 2020-11-12 23:58:16 +0100 |
commit | e408aeef8663fd6e3075aef252404c55d710a75e (patch) | |
tree | 5c6594e4754d67dad8fb72306d1976e9995f9e42 | |
parent | Merge remote-tracking branch 'remotes/mcayland/tags/qemu-macppc-20201112' int... (diff) | |
download | qemu-e408aeef8663fd6e3075aef252404c55d710a75e.tar.gz qemu-e408aeef8663fd6e3075aef252404c55d710a75e.tar.xz qemu-e408aeef8663fd6e3075aef252404c55d710a75e.zip |
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>
-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: |