Commit 3a1fe76b authored by Vasily Averin's avatar Vasily Averin Committed by Kleber Sacilotto de Souza

drm/qxl: qxl_release leak in qxl_hw_surface_alloc()

BugLink: https://bugs.launchpad.net/bugs/1878246

commit a65aa9c3 upstream.

Cc: stable@vger.kernel.org
Fixes: 8002db63 ("qxl: convert qxl driver to proper use for reservations")
Signed-off-by: default avatarVasily Averin <vvs@virtuozzo.com>
Link: http://patchwork.freedesktop.org/patch/msgid/2e5a13ae-9ab2-5401-aa4d-03d5f5593423@virtuozzo.comSigned-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarIan May <ian.may@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent 7848009f
...@@ -500,9 +500,10 @@ int qxl_hw_surface_alloc(struct qxl_device *qdev, ...@@ -500,9 +500,10 @@ int qxl_hw_surface_alloc(struct qxl_device *qdev,
return ret; return ret;
ret = qxl_release_reserve_list(release, true); ret = qxl_release_reserve_list(release, true);
if (ret) if (ret) {
qxl_release_free(qdev, release);
return ret; return ret;
}
cmd = (struct qxl_surface_cmd *)qxl_release_map(qdev, release); cmd = (struct qxl_surface_cmd *)qxl_release_map(qdev, release);
cmd->type = QXL_SURFACE_CMD_CREATE; cmd->type = QXL_SURFACE_CMD_CREATE;
cmd->flags = QXL_SURF_FLAG_KEEP_DATA; cmd->flags = QXL_SURF_FLAG_KEEP_DATA;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment