summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorVasily Averin <vvs@virtuozzo.com>2020-04-27 08:32:51 +0300
committerGerd Hoffmann <kraxel@redhat.com>2020-04-28 12:03:48 +0200
commita65aa9c3676ffccb21361d52fcfedd5b5ff387d7 (patch)
tree3fcda3326b70d31e1c7c1e898866011e07056779 /drivers
parent85e9b88af1e6164f19ec71381efd5e2bcfc17620 (diff)
drm/qxl: qxl_release leak in qxl_hw_surface_alloc()
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/2e5a13ae-9ab2-5401-aa4d-03d5f5593423@virtuozzo.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/qxl/qxl_cmd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/qxl/qxl_cmd.c b/drivers/gpu/drm/qxl/qxl_cmd.c
index d1086b2a6892..fa8762d15d0f 100644
--- a/drivers/gpu/drm/qxl/qxl_cmd.c
+++ b/drivers/gpu/drm/qxl/qxl_cmd.c
@@ -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;