mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 14:42:37 +02:00
virtio-blk: free vblk-vqs in error path of virtblk_probe()
[ Upstream commite7eea44eef] Else there will be memory leak if alloc_disk() fails. Fixes:6a27b656fc("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> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
1788e4dde4
commit
a8c7823274
|
|
@ -882,6 +882,7 @@ static int virtblk_probe(struct virtio_device *vdev)
|
|||
put_disk(vblk->disk);
|
||||
out_free_vq:
|
||||
vdev->config->del_vqs(vdev);
|
||||
kfree(vblk->vqs);
|
||||
out_free_vblk:
|
||||
kfree(vblk);
|
||||
out_free_index:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user