diff options
author | xndcn <xndchn@gmail.com> | 2021-03-05 18:18:19 +0300 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2021-03-09 14:06:18 +0300 |
commit | 377f8331d0565e6f71ba081c894029a92d0c7e77 (patch) | |
tree | 3a9836ddd3cf46bf2a45c42fe557651ea0cca14f /drivers/gpu/drm/virtio/virtgpu_object.c | |
parent | edf208591724e66682cc5aa0b61035800757a49a (diff) | |
download | linux-377f8331d0565e6f71ba081c894029a92d0c7e77.tar.xz |
drm/virtio: fix possible leak/unlock virtio_gpu_object_array
virtio_gpu_object array is not freed or unlocked in some
failed cases.
Signed-off-by: xndcn <xndchn@gmail.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20210305151819.14330-1-xndchn@gmail.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/virtio/virtgpu_object.c')
-rw-r--r-- | drivers/gpu/drm/virtio/virtgpu_object.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/virtio/virtgpu_object.c b/drivers/gpu/drm/virtio/virtgpu_object.c index d69a5b6da553..4ff1ec28e630 100644 --- a/drivers/gpu/drm/virtio/virtgpu_object.c +++ b/drivers/gpu/drm/virtio/virtgpu_object.c @@ -248,6 +248,7 @@ int virtio_gpu_object_create(struct virtio_gpu_device *vgdev, ret = virtio_gpu_object_shmem_init(vgdev, bo, &ents, &nents); if (ret != 0) { + virtio_gpu_array_put_free(objs); virtio_gpu_free_object(&shmem_obj->base); return ret; } |