Skip to content

Commit

Permalink
drm/qxl: qxl_release leak in qxl_hw_surface_alloc()
Browse files Browse the repository at this point in the history
Cc: [email protected]
Fixes: 8002db6 ("qxl: convert qxl driver to proper use for reservations")
Signed-off-by: Vasily Averin <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Gerd Hoffmann <[email protected]>
  • Loading branch information
vaverin authored and kraxel committed Apr 28, 2020
1 parent 85e9b88 commit a65aa9c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/gpu/drm/qxl/qxl_cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -480,9 +480,10 @@ int qxl_hw_surface_alloc(struct qxl_device *qdev,
return ret;

ret = qxl_release_reserve_list(release, true);
if (ret)
if (ret) {
qxl_release_free(qdev, release);
return ret;

}
cmd = (struct qxl_surface_cmd *)qxl_release_map(qdev, release);
cmd->type = QXL_SURFACE_CMD_CREATE;
cmd->flags = QXL_SURF_FLAG_KEEP_DATA;
Expand Down

0 comments on commit a65aa9c

Please sign in to comment.