Fix use after free in vfio_migration_probe
Fixes Coverity issue:
CID 1436126: Memory - illegal accesses (USE_AFTER_FREE)
Fixes: a9e271ec9b
("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>
This commit is contained in:
parent
cb5d19e829
commit
e408aeef86
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user