Commit 70be6f32 authored by Dan Carpenter's avatar Dan Carpenter Committed by Alex Williamson

vfio/mlx5: error pointer dereference in error handling

This code frees the wrong "buf" variable and results in an error pointer
dereference.

Fixes: 34e2f271 ("vfio/mlx5: Introduce multiple loads")
Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Reviewed-by: default avatarYishai Hadas <yishaih@nvidia.com>
Link: https://lore.kernel.org/r/Y5IKia5SaiVxYmG5@kiliSigned-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
parent fe3dd71d
......@@ -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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment