mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 06:31:49 +00:00
virtio-vdpa: Fix cpumask memory leak in virtio_vdpa_find_vqs()
Free the cpumask allocated by create_affinity_masks() before returning
from the function.
Fixes: 3dad56823b
("virtio-vdpa: Support interrupt affinity spreading mechanism")
Signed-off-by: Gal Pressman <gal@nvidia.com>
Reviewed-by: Dragos Tatulea <dtatulea@nvidia.com>
Message-Id: <20230726191036.14324-1-dtatulea@nvidia.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Reviewed-by: Xie Yongji <xieyongji@bytedance.com>
This commit is contained in:
parent
7ca26efb09
commit
df95570464
@ -393,11 +393,13 @@ static int virtio_vdpa_find_vqs(struct virtio_device *vdev, unsigned int nvqs,
|
||||
cb.callback = virtio_vdpa_config_cb;
|
||||
cb.private = vd_dev;
|
||||
ops->set_config_cb(vdpa, &cb);
|
||||
kfree(masks);
|
||||
|
||||
return 0;
|
||||
|
||||
err_setup_vq:
|
||||
virtio_vdpa_del_vqs(vdev);
|
||||
kfree(masks);
|
||||
return err;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user