vmwgfx: Unreference surface on cursor error path
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com> Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
55bde5b215
commit
e5c8dbb814
1 changed files with 1 additions and 0 deletions
|
@ -111,6 +111,7 @@ int vmw_du_crtc_cursor_set(struct drm_crtc *crtc, struct drm_file *file_priv,
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
if (!surface->snooper.image) {
|
if (!surface->snooper.image) {
|
||||||
DRM_ERROR("surface not suitable for cursor\n");
|
DRM_ERROR("surface not suitable for cursor\n");
|
||||||
|
vmw_surface_unreference(&surface);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue