Skip to content

Commit

Permalink
drm/qxl: qxl_release leak in qxl_draw_dirty_fb()
Browse files Browse the repository at this point in the history
ret should be changed to release allocated struct qxl_release

Cc: stable@vger.kernel.org
Fixes: 8002db6 ("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>
  • Loading branch information
Vasily Averin authored and Gerd Hoffmann committed Apr 28, 2020
1 parent 45c5d2a commit 85e9b88
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/gpu/drm/qxl/qxl_draw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 85e9b88

Please sign in to comment.