mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
vfio/mlx5: error pointer dereference in error handling
This code frees the wrong "buf" variable and results in an error pointer
dereference.
Fixes: 34e2f27143
("vfio/mlx5: Introduce multiple loads")
Signed-off-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: Yishai Hadas <yishaih@nvidia.com>
Link: https://lore.kernel.org/r/Y5IKia5SaiVxYmG5@kili
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
This commit is contained in:
parent
fe3dd71db2
commit
70be6f3228
1 changed files with 1 additions and 1 deletions
|
@ -826,7 +826,7 @@ mlx5vf_pci_resume_device_data(struct mlx5vf_pci_core_device *mvdev)
|
|||
spin_lock_init(&migf->list_lock);
|
||||
return migf;
|
||||
out_buf:
|
||||
mlx5vf_free_data_buffer(buf);
|
||||
mlx5vf_free_data_buffer(migf->buf);
|
||||
out_pd:
|
||||
mlx5vf_cmd_dealloc_pd(migf);
|
||||
out_free:
|
||||
|
|
Loading…
Add table
Reference in a new issue