mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-12 16:11:04 +00:00
virtio-blk: free vblk-vqs in error path of virtblk_probe()
Else there will be memory leak if alloc_disk() fails. Fixes: 6a27b656fc02 ("block: virtio-blk: support multi virt queues per virtio-blk device") Signed-off-by: Hou Tao <houtao1@huawei.com> Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> Reviewed-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
3e20aa9630
commit
e7eea44eef
@ -878,6 +878,7 @@ out_put_disk:
|
||||
put_disk(vblk->disk);
|
||||
out_free_vq:
|
||||
vdev->config->del_vqs(vdev);
|
||||
kfree(vblk->vqs);
|
||||
out_free_vblk:
|
||||
kfree(vblk);
|
||||
out_free_index:
|
||||
|
Loading…
x
Reference in New Issue
Block a user