]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/qxl: qxl_release leak in qxl_draw_dirty_fb()
authorVasily Averin <vvs@virtuozzo.com>
Mon, 27 Apr 2020 05:32:46 +0000 (08:32 +0300)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 28 Apr 2020 10:03:41 +0000 (12:03 +0200)
ret should be changed to release allocated struct qxl_release

Cc: stable@vger.kernel.org
Fixes: 8002db6336dd ("qxl: convert qxl driver to proper use for reservations")
Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
Link: http://patchwork.freedesktop.org/patch/msgid/22cfd55f-07c8-95d0-a2f7-191b7153c3d4@virtuozzo.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
drivers/gpu/drm/qxl/qxl_draw.c

index 5bebf1ea1c5d0c5b59b1cb3579dc62f93dba0cef..f8776d60d08e2c88833676e9f6524572b95c82ab 100644 (file)
@@ -209,9 +209,10 @@ void qxl_draw_dirty_fb(struct qxl_device *qdev,
                goto out_release_backoff;
 
        rects = drawable_set_clipping(qdev, num_clips, clips_bo);
-       if (!rects)
+       if (!rects) {
+               ret = -EINVAL;
                goto out_release_backoff;
-
+       }
        drawable = (struct qxl_drawable *)qxl_release_map(qdev, release);
 
        drawable->clip.type = SPICE_CLIP_TYPE_RECTS;