Skip to content

Commit 70be6f3

Browse files
error27awilliam
authored andcommitted
vfio/mlx5: error pointer dereference in error handling
This code frees the wrong "buf" variable and results in an error pointer dereference. Fixes: 34e2f27 ("vfio/mlx5: Introduce multiple loads") Signed-off-by: Dan Carpenter <[email protected]> Reviewed-by: Yishai Hadas <[email protected]> Link: https://lore.kernel.org/r/Y5IKia5SaiVxYmG5@kili Signed-off-by: Alex Williamson <[email protected]>
1 parent fe3dd71 commit 70be6f3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/vfio/pci/mlx5/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,7 @@ mlx5vf_pci_resume_device_data(struct mlx5vf_pci_core_device *mvdev)
826826
spin_lock_init(&migf->list_lock);
827827
return migf;
828828
out_buf:
829-
mlx5vf_free_data_buffer(buf);
829+
mlx5vf_free_data_buffer(migf->buf);
830830
out_pd:
831831
mlx5vf_cmd_dealloc_pd(migf);
832832
out_free:

0 commit comments

Comments
 (0)